BUG-2825: simplify test clarity 83/35383/1
authorRobert Varga <robert.varga@pantheon.sk>
Thu, 25 Feb 2016 11:39:44 +0000 (12:39 +0100)
committerRobert Varga <robert.varga@pantheon.sk>
Thu, 25 Feb 2016 11:40:03 +0000 (12:40 +0100)
Change-Id: Id672b1b13abd9a5d59608e14884d85a06e51d72a
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
model/ietf/ietf-type-util/src/test/java/org/opendaylight/mdsal/model/ietf/util/Ipv6UtilsTest.java

index 154f6cc83fa0d9cef5ab54082e5d2667a1188329..aecbe9a2d43f586ae7451eac4fd282ebbdac76e8 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.mdsal.model.ietf.util;
 
+import com.google.common.net.InetAddresses;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -14,14 +15,9 @@ import org.junit.Test;
  * @author Anton Ivanov aivanov@brocade.com
  */
 public class Ipv6UtilsTest {
-    /*
-     * Test canonicalBinaryV6Address
-     */
     @Test
-    public void canonicalBinaryV6AddressTest() {
+    public void testFullQuads() {
         byte [] ipv6binary = Ipv6Utils.canonicalBinaryV6Address("0000:0000:0000:0000:0000:0000:0000:0001");
-        byte [] expected = {0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1};
-
-        Assert.assertArrayEquals(expected, ipv6binary);
+        Assert.assertArrayEquals(InetAddresses.forString("::1").getAddress(), ipv6binary);
     }
 }