### Question:
IPUtils { public static boolean isValidIpv6String(String in) { IPv6 ip = new IPv6(in); try { ip.getBytes(); } catch (IPStringConversionException ex) { return false; } return true; }  static Integer rndInt(int lo, int hi); static Double rndDouble(double lo, double hi); static Integer rndPosInt(int lo, int hi); static String rndIp(); static Object rndChoice(List oList); static Object rndChoice(Object[] oArray); static String rndperc(); static final int ubyte2int(byte in); static final byte int2ubyte(int in); static boolean isValidIpv6String(String in); static final boolean isValidIpv4Subnet(String in); static boolean isValidIpv6Subnet(String in); static boolean isValidIpv4String(String in); static int nibble2int(byte nibble); static final byte int2nibble(int in); static String int16bit2hex(int i16); static int hex16bit2int(String in); static boolean IP4RegEx(String ip); static boolean IP6RegEx(String ip); static boolean IPRegEx(String ip);  }### Answer:
@Test public void testShouldAcceptZeroCompressedIpv4MixIn() { assertTrue("Expected acceptence of \"::192.168.3.51\"", IPUtils.isValidIpv6String("::192.168.3.51")); }
@Test public void testShouldAcceptRightCompressedIpv4MixIn() { assertTrue("Expected acceptence of \"efff::192.168.3.51\"", IPUtils.isValidIpv6String("efff::192.168.3.51")); }
@Test public void testShouldAcceptLeftCompressedIpv4MixIn() { assertTrue("Expected acceptence of \"efff::1234:192.168.3.51\"", IPUtils.isValidIpv6String("efff::1234:192.168.3.51")); }
@Test public void testShouldRejectTripleColonIPv4Mixin() { assertFalse("Expected rejection of \"ffff:::192.168.3.51\"", IPUtils.isValidIpv6String("ffff:::192.168.3.51")); }
@Test public void testShouldRejectGoogleIPv6() { assertFalse("expected rejection of \"www.google.com\"", IPUtils.isValidIpv6String("www.google.com")); }
@Test public void testShouldAcceptValidIPv61() { assertTrue("expected acceptance of \"1234:5678::\"", IPUtils.isValidIpv6String("1234:5678::")); }
@Test public void testShouldRejectOutofRangeHexIpv6() { assertFalse("expected rejefction of \"fffg::1234\"", IPUtils.isValidIpv6String("fffg::1234\"")); }
@Test public void testShouldRejectToManyHexDigitsIpv6() { assertFalse("expected rejection of \"12345::\"", IPUtils.isValidIpv6String("12345::")); }
@Test public void testShouldAcceptAllZeroCompressionIpv6() { assertTrue("Expected acceptance of \"::\"", IPUtils.isValidIpv6String("::")); }
@Test public void testShouldAcceptLeftZeroCompressionIpv6() { assertTrue("Expected acceptance of \"::1234\"", IPUtils.isValidIpv6String("::1234")); }
@Test public void testShouldAcceptRightZeroCompressionIpv6() { assertTrue("Expected acceptance pf \"1234::\"", IPUtils.isValidIpv6String("1234::")); }