public static Ip4Address valueOf(int value) {
        byte[] bytes =
            ByteBuffer.allocate(INET_BYTE_LENGTH).putInt(value).array();
        return new Ip4Address(bytes);
    }
@Test
    public void testValueOfByteArrayIPv4() {
        Ip4Address ipAddress;
        byte[] value;

        value = new byte[] {1, 2, 3, 4};
        ipAddress = Ip4Address.valueOf(value);
        assertThat(ipAddress.toString(), is("1.2.3.4"));

        value = new byte[] {0, 0, 0, 0};
        ipAddress = Ip4Address.valueOf(value);
        assertThat(ipAddress.toString(), is("0.0.0.0"));

        value = new byte[] {(byte) 0xff, (byte) 0xff,
                            (byte) 0xff, (byte) 0xff};
        ipAddress = Ip4Address.valueOf(value);
        assertThat(ipAddress.toString(), is("255.255.255.255"));
    }