Tier { public Tier() { networks = new HashSet<Network>(); } Tier();  Tier(String name);  Tier(String name, Integer maximumNumberInstances, Integer minimumNumberInstances,
            Integer initialNumberInstances, List<ProductRelease> productReleases);  Tier(String name, Integer maximumNumberInstances, Integer minimumNumberInstances,
            Integer initialNumberInstances, List<ProductRelease> productReleases, String flavour, String image,
            String icono);  Tier(String name, Integer maximumNumberInstances, Integer minimumNumberInstances,
            Integer initialNumberInstances, List<ProductRelease> productReleases, String flavour, String image,
            String icono, String keypair, String floatingip, String payload); void addNetwork(Network network); void deleteNetwork(Network network); void addProductRelease(ProductRelease productRelease); int containsNetwork(Network net2); @Override boolean equals(Object obj); String getFlavour(); String getFloatingip(); String getIcono(); Long getId(); String getImage(); Integer getInitialNumberInstances(); String getKeypair(); Integer getMaximumNumberInstances(); Integer getMinimumNumberInstances(); String getName(); Set<Network> getNetworks(); String getPayload(); String getProductNameBalanced(); List<ProductRelease> getProductReleases(); String getVdc(); @Override int hashCode(); void removeNetwork(Network network); void removeProductRelease(ProductRelease productRelease); void setEnviromentName(String environmentname); String getEnviromentName(); void setFlavour(String flavour); void setFloatingip(String floatingip); void setIcono(String icono); void setImage(String image); void setInitialNumberInstances(Integer initialNumberInstances); void setKeypair(String keypair); void setMaximumNumberInstances(Integer maximumNumberInstances); void setMinimumNumberInstances(Integer minimumNumberInstances); void setName(String name); void setNetworks(Set<Network> networks); void setPayload(String payload); void setProductReleases(List<ProductRelease> productReleases); void setVdc(String vdc); TierDto toDto(); String toJson(); void updateNetwork(Network network); String getRegion(); void setRegion(String region); String getAffinity(); void setAffinity(String affinity); String toString(); static final String NAME_FIELD; static final String VDC_FIELD; static final String ENVIRONMENT_NAME_FIELD; }
@Test public void testTier() throws Exception { Integer minimum = new Integer(1); Integer initial = new Integer(2); Integer maximum = new Integer(1); Tier tier = new Tier("tier", maximum, minimum, initial, null, "2", "image", "icono", "keypair", "yes", null); tier.setRegion("regionOne"); SecurityGroup securityGroup = new SecurityGroup("nanme", "description"); TierDto tierDto = tier.toDto(); Tier tier3 = tierDto.fromDto("vdc", "env"); assertEquals(tier.getInitialNumberInstances(), initial); assertEquals(tier.getMaximumNumberInstances(), maximum); assertEquals(tier.getMinimumNumberInstances(), minimum); assertEquals(tier3.equals(tier), true); }