NeutronSubnetIpAllocationPool implements Serializable { public boolean contains(String inputString) { long inputIp = convert(inputString); long startIp = convert(poolStart); long endIp = convert(poolEnd); return inputIp >= startIp && inputIp <= endIp; } 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 containsTest() { NeutronSubnetIpAllocationPool apUT = new NeutronSubnetIpAllocationPool(); apUT.setPoolStart("10.18.0.2"); apUT.setPoolEnd("10.18.0.4"); Assert.assertFalse("Contains Test 1: address one below pool start failed", apUT.contains("10.18.0.1")); Assert.assertTrue("Contains Test 2: address == pool start failed", apUT.contains("10.18.0.2")); Assert.assertTrue("Contains Test 3: adress in pool failed", apUT.contains("10.18.0.3")); Assert.assertTrue("Contains Test 4: address == pool end failed", apUT.contains("10.18.0.4")); Assert.assertFalse("Contains Test 5: one above pool end failed", apUT.contains("10.18.0.5")); }