public static IpAddress valueOf(int value) {
        byte[] bytes =
            ByteBuffer.allocate(INET_BYTE_LENGTH).putInt(value).array();
        return new IpAddress(Version.INET, bytes);
    }
@Test
    public void testEqualityIPv4() {
        new EqualsTester()
            .addEqualityGroup(IpAddress.valueOf("1.2.3.4"),
                              IpAddress.valueOf("1.2.3.4"))
            .addEqualityGroup(IpAddress.valueOf("1.2.3.5"),
                              IpAddress.valueOf("1.2.3.5"))
            .addEqualityGroup(IpAddress.valueOf("0.0.0.0"),
                              IpAddress.valueOf("0.0.0.0"))
            .addEqualityGroup(IpAddress.valueOf("255.255.255.255"),
                              IpAddress.valueOf("255.255.255.255"))
            .testEquals();
    }