@Test public void testConstructWithHosts() throws Exception { List<HostIPs> hosts = new ArrayList<>(); hosts.add(new HostIPs("ipv4_1", "ipv6_1")); hosts.add(new HostIPs("ipv4_2", "ipv6_2")); StackData stackData = new StackData("/A/B/C/D", hosts); Assert.assertEquals(hosts, stackData.getHosts().get()); }
public Optional<List<HostIPs>> getHosts() { return hosts; }
StackData { public Optional<List<HostIPs>> getHosts() { return hosts; } }
StackData { public Optional<List<HostIPs>> getHosts() { return hosts; } StackData(String path, List<HostIPs> hosts);  StackData(String path);  StackData(String dataCenter, String availabilityZone, String flavor, String serviceName, List<HostIPs> hosts);  StackData(String dataCenter, String availabilityZone, String flavor, String serviceName); }
StackData { public Optional<List<HostIPs>> getHosts() { return hosts; } StackData(String path, List<HostIPs> hosts);  StackData(String path);  StackData(String dataCenter, String availabilityZone, String flavor, String serviceName, List<HostIPs> hosts);  StackData(String dataCenter, String availabilityZone, String flavor, String serviceName); String getDataCenter(); String getAvailabilityZone(); String getFlavor(); String getServiceName(); String getPath(); String getStackOnlyPath(); @Override String toString(); Optional<List<HostIPs>> getHosts(); @Override boolean equals(Object o); @Override int hashCode(); }
StackData { public Optional<List<HostIPs>> getHosts() { return hosts; } StackData(String path, List<HostIPs> hosts);  StackData(String path);  StackData(String dataCenter, String availabilityZone, String flavor, String serviceName, List<HostIPs> hosts);  StackData(String dataCenter, String availabilityZone, String flavor, String serviceName); String getDataCenter(); String getAvailabilityZone(); String getFlavor(); String getServiceName(); String getPath(); String getStackOnlyPath(); @Override String toString(); Optional<List<HostIPs>> getHosts(); @Override boolean equals(Object o); @Override int hashCode();  }