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

        value = new byte[] {0x11, 0x11, 0x22, 0x22,
                            0x33, 0x33, 0x44, 0x44,
                            0x55, 0x55, 0x66, 0x66,
                            0x77, 0x77, (byte) 0x88, (byte) 0x88};
        ipPrefix = Ip6Prefix.valueOf(value, 120);
        assertThat(ipPrefix.toString(),
                   is("1111:2222:3333:4444:5555:6666:7777:8800/120"));

        ipPrefix = Ip6Prefix.valueOf(value, 128);
        assertThat(ipPrefix.toString(),
                   is("1111:2222:3333:4444:5555:6666:7777:8888/128"));

        value = new byte[] {0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00,
                            0x00, 0x00, 0x00, 0x00};
        ipPrefix = Ip6Prefix.valueOf(value, 0);
        assertThat(ipPrefix.toString(), is("::/0"));

        ipPrefix = Ip6Prefix.valueOf(value, 128);
        assertThat(ipPrefix.toString(), is("::/128"));

        value = new byte[] {(byte) 0xff, (byte) 0xff,
                            (byte) 0xff, (byte) 0xff,
                            (byte) 0xff, (byte) 0xff,
                            (byte) 0xff, (byte) 0xff,
                            (byte) 0xff, (byte) 0xff,
                            (byte) 0xff, (byte) 0xff,
                            (byte) 0xff, (byte) 0xff,
                            (byte) 0xff, (byte) 0xff};
        ipPrefix = Ip6Prefix.valueOf(value, 0);
        assertThat(ipPrefix.toString(), is("::/0"));

        ipPrefix = Ip6Prefix.valueOf(value, 64);
        assertThat(ipPrefix.toString(), is("ffff:ffff:ffff:ffff::/64"));

        ipPrefix = Ip6Prefix.valueOf(value, 128);
        assertThat(ipPrefix.toString(),
                   is("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/128"));
    }