From a4e38f7c847e9c17b57d909980e2c440049d52fd Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Wed, 30 Aug 2017 11:25:20 -0700 Subject: [PATCH] Prefer Guava BaseEncoding over JAXB --- .../nova/v2_0/options/CreateServerOptionsTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptionsTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptionsTest.java index 1e91a3ef51..2d5f0c36b1 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptionsTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptionsTest.java @@ -16,9 +16,10 @@ */ package org.jclouds.openstack.nova.v2_0.options; -import static javax.xml.bind.DatatypeConverter.parseHexBinary; import static org.testng.Assert.assertTrue; +import com.google.common.io.BaseEncoding; + import org.testng.annotations.Test; /** @@ -28,9 +29,9 @@ import org.testng.annotations.Test; public class CreateServerOptionsTest { private static final byte[] PLAINTEXT = "This is plain Text".getBytes(); - private static final byte[] GZIPTOOSHORT = parseHexBinary("1f8b0000"); - private static final byte[] GZIPOK = parseHexBinary("1f8b0800b6a9a45800034be4020007a1eadd02000000"); - private static final byte[] OTHERBIN = parseHexBinary("f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff"); + private static final byte[] GZIPTOOSHORT = BaseEncoding.base16().lowerCase().decode("1f8b0000"); + private static final byte[] GZIPOK = BaseEncoding.base16().lowerCase().decode("1f8b0800b6a9a45800034be4020007a1eadd02000000"); + private static final byte[] OTHERBIN = BaseEncoding.base16().lowerCase().decode("f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff"); public void testPlainText() { CreateServerOptions o = new CreateServerOptions().userData(PLAINTEXT);