NeutronSubnet extends NeutronBaseAttributes<NeutronSubnet> { public String getLowAddr() { String ans = null; for (NeutronSubnetIpAllocationPool pool : allocationPools) { if (ans == null) { ans = pool.getPoolStart(); } else { if (ipVersion == IPV4_VERSION && NeutronSubnetIpAllocationPool .convert(pool.getPoolStart()) < NeutronSubnetIpAllocationPool.convert(ans)) { ans = pool.getPoolStart(); } if (ipVersion == IPV6_VERSION && NeutronSubnetIpAllocationPool.convertV6(pool.getPoolStart()) .compareTo(NeutronSubnetIpAllocationPool.convertV6(ans)) < 0) { ans = pool.getPoolStart(); } } } return ans; }  String getNetworkUUID(); void setNetworkUUID(String networkUUID); Integer getIpVersion(); void setIpVersion(Integer ipVersion); String getCidr(); void setCidr(String cidr); String getGatewayIp(); void setGatewayIp(String gatewayIp); List<String> getDnsNameservers(); void setDnsNameservers(List<String> dnsNameservers); List<NeutronSubnetIpAllocationPool> getAllocationPools(); void setAllocationPools(List<NeutronSubnetIpAllocationPool> allocationPools); List<NeutronRoute> getHostRoutes(); void setHostRoutes(List<NeutronRoute> hostRoutes); boolean isEnableDHCP(); Boolean getEnableDHCP(); void setEnableDHCP(Boolean newValue); String getIpV6AddressMode(); void setIpV6AddressMode(String ipV6AddressMode); String getIpV6RaMode(); void setIpV6RaMode(String ipV6RaMode); boolean isValidCIDR(); boolean gatewayIp_Pool_overlap(); @Override void initDefaults(); boolean isValidIp(String ipAddress); String getLowAddr(); @Override String toString();  }
@Test public void getLowAddrTest() { NeutronSubnet objectUT = new NeutronSubnet(); objectUT.setIpVersion(4); objectUT.setCidr("10.18.0.0/24"); NeutronSubnetIpAllocationPool allocationPool = new NeutronSubnetIpAllocationPool(); allocationPool.setPoolStart("10.18.0.2"); allocationPool.setPoolEnd("10.18.0.6"); List<NeutronSubnetIpAllocationPool> pools = new ArrayList<>(); pools.add(allocationPool); allocationPool = new NeutronSubnetIpAllocationPool(); allocationPool.setPoolStart("10.18.0.10"); allocationPool.setPoolEnd("10.18.0.15"); objectUT.setAllocationPools(pools); Assert.assertEquals("getLowAddr Test 1: test of returned address", "10.18.0.2", objectUT.getLowAddr()); objectUT.setIpVersion(6); objectUT.setCidr("2015::0/24"); allocationPool = new NeutronSubnetIpAllocationPool(); allocationPool.setPoolStart("2015::2"); allocationPool.setPoolEnd("2015::6"); pools = new ArrayList<>(); pools.add(allocationPool); allocationPool = new NeutronSubnetIpAllocationPool(); allocationPool.setPoolStart("2015::10"); allocationPool.setPoolEnd("2015::15"); objectUT.setAllocationPools(pools); Assert.assertEquals("getLowAddr v6 Test 1: test of returned address", "2015::2", objectUT.getLowAddr()); }