NeutronSubnetIpAllocationPool implements Serializable { static String longToIp(long input) { int part; long ipLong = input; String[] parts = new String[IPV4_DOTTED_QUADS]; for (part = 0; part < IPV4_DOTTED_QUADS; part++) { parts[IPV4_DOTTED_QUAD_OFFSET - part] = String.valueOf(ipLong & IPV4_DOTTED_QUAD_MASK); ipLong >>= BYTE_LENGTH; } return join(parts, "."); } NeutronSubnetIpAllocationPool();  NeutronSubnetIpAllocationPool(String lowAddress, String highAddress); String getPoolStart(); void setPoolStart(String poolStart); String getPoolEnd(); void setPoolEnd(String poolEnd); boolean contains(String inputString); boolean containsV6(String inputString); static String join(String[] strings, String separator); List<NeutronSubnetIpAllocationPool> splitPool(String ipAddress); @Override String toString(); List<NeutronSubnetIpAllocationPool> splitPoolV6(String ipAddress);  }
@Test public void longToIpTest() { Assert.assertEquals("longToIp Test 1: convert of 538184192L failed", "32.20.10.0", NeutronSubnetIpAllocationPool.longToIp(538184192L)); Assert.assertEquals("longToIp Test 2: convert of 3232236172L failed", "192.168.2.140", NeutronSubnetIpAllocationPool.longToIp(3232236172L)); }