public static Ip6Prefix valueOf(byte[] address, int prefixLength) {
        return new Ip6Prefix(Ip6Address.valueOf(address), prefixLength);
    }
@Test
    public void testContainsIpPrefixIPv6() {
        Ip6Prefix ipPrefix;

        ipPrefix = Ip6Prefix.valueOf("1111:2222:3333:4444::/120");
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/120")));
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/128")));
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::1/128")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/64")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4445::/120")));
        assertFalse(ipPrefix.contains(Ip6Prefix.valueOf("::/64")));
        assertFalse(ipPrefix.contains(Ip6Prefix.valueOf("::/0")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128")));

        ipPrefix = Ip6Prefix.valueOf("1111:2222:3333:4444::/128");
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/120")));
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/128")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::1/128")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/64")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4445::/120")));
        assertFalse(ipPrefix.contains(Ip6Prefix.valueOf("::/64")));
        assertFalse(ipPrefix.contains(Ip6Prefix.valueOf("::/0")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128")));

        ipPrefix = Ip6Prefix.valueOf("::/0");
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/120")));
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/128")));
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::1/128")));
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/64")));
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4445::/120")));
        assertTrue(ipPrefix.contains(Ip6Prefix.valueOf("::/64")));
        assertTrue(ipPrefix.contains(Ip6Prefix.valueOf("::/0")));
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128")));

        ipPrefix =
            Ip6Prefix.valueOf("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128");
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/120")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/128")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::1/128")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4444::/64")));
        assertFalse(ipPrefix.contains(
                Ip6Prefix.valueOf("1111:2222:3333:4445::/120")));
        assertFalse(ipPrefix.contains(Ip6Prefix.valueOf("::/64")));
        assertFalse(ipPrefix.contains(Ip6Prefix.valueOf("::/0")));
        assertTrue(ipPrefix.contains(
                Ip6Prefix.valueOf("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128")));
    }