NeutronSubnetIpAllocationPool implements Serializable { public boolean containsV6(String inputString) { BigInteger inputIp = convertV6(inputString); BigInteger startIp = convertV6(poolStart); BigInteger endIp = convertV6(poolEnd); return inputIp.compareTo(startIp) >= 0 && inputIp.compareTo(endIp) <= 0; } 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 containsV6Test() { NeutronSubnetIpAllocationPool apUT = new NeutronSubnetIpAllocationPool(); apUT.setPoolStart("2015:0:0:0:0:0:0:2"); apUT.setPoolEnd("2015:0:0:0:0:0:0:4"); Assert.assertFalse("Contains V6 Test 1: address one below pool start failed", apUT.containsV6("2015:0:0:0:0:0:0:1")); Assert.assertTrue("Contains V6 Test 2: address == pool start failed", apUT.containsV6("2015:0:0:0:0:0:0:2")); Assert.assertTrue("Contains V6 Test 3: adress in pool failed", apUT.containsV6("2015:0:0:0:0:0:0:3")); Assert.assertTrue("Contains V6 Test 4: address == pool end failed", apUT.containsV6("2015:0:0:0:0:0:0:4")); Assert.assertFalse("Contains V6 Test 5: one above pool end failed", apUT.containsV6("2015:0:0:0:0:0:0:5")); }