### Question:
Utils { public static String getStringIpPrefix(IpPrefix ipPrefix) { Preconditions.checkNotNull(ipPrefix); if (ipPrefix.getIpv4Prefix() != null) { String ipPrefixIpv4 = ipPrefix.getIpv4Prefix().getValue(); return ipPrefixIpv4.replace('/', '_'); } String ipPrefixIpv6 = ipPrefix.getIpv6Prefix().getValue(); return ipPrefixIpv6.replace('/', '_').replace(':', '.'); } private  Utils(); static IpPrefix createIpPrefix(String cidr); static IpAddress createIpAddress(String ipAddress); static String getStringIpPrefix(IpPrefix ipPrefix); static String getStringIpAddress(IpAddress ipAddress); static String normalizeUuid(String string); static void syncNat(ReadWriteTransaction rwTx, Floatingip oldFloatingIp, Floatingip newFloatingIp); static void removeNat(ReadWriteTransaction rwTx, Floatingip removedFloatingIp);  }### Answer:
@Test public final void testGetStringIpPrefix_ipv4() { String ipv4Prefix = "1.1.1.1/8"; assertEquals(ipv4Prefix.replace('/', '_'), Utils.getStringIpPrefix(new IpPrefix(new Ipv4Prefix(ipv4Prefix)))); }
@Test public final void testGetStringIpPrefix_ipv6() { String ipv6Prefix = "fd1c:29d6:85d1::/48"; assertEquals(ipv6Prefix.replace('/', '_').replace(':', '.'), Utils.getStringIpPrefix(new IpPrefix(new Ipv6Prefix(ipv6Prefix)))); }
@Test public final void testGetStringIpPrefix_null() { thrown.expect(NullPointerException.class); Utils.getStringIpPrefix(null); }