@Test public void testProductRelease() throws Exception { Set<Attribute> atts = new HashSet<Attribute>(); Attribute att = new Attribute(); att.setKey("att"); att.setValue("value"); att.setDescription("description"); atts.add(att); ProductRelease product = new ProductRelease("name", "version", "description", atts); product.addAttribute(new Attribute("att2", "value", "description")); product.setTierName("tierName"); product.setId(new Long(1)); assertEquals(product.getName(), "name-version"); assertEquals(product.getTierName(), "tierName"); assertEquals(product.getVersion(), "version"); assertEquals(product.getId().intValue(), 1); assertEquals(product.getDescription(), "description"); assertEquals(product.getAttributes().size(), 2); assertEquals(product.getAttribute("att").getValue(), "value"); assertEquals(product.getMetadatas().size(), 0); Metadata meta = new Metadata("key", "value", "description"); product.addMetadata(meta); Metadata meta2 = new Metadata(); meta2.setKey("meta"); meta2.setValue("value"); meta2.setDescription("description"); assertEquals(meta.equals(meta2), false); product.addMetadata(meta2); assertEquals(product.getMetadata("key").getKey(), "key"); assertEquals(product.getMetadata("key").getValue(), "value"); assertEquals(product.getMetadata("key").getDescription(), "description"); assertEquals(product.getAttribute("att2").getKey(), "att2"); assertEquals(product.getAttribute("att2").getValue(), "value"); assertEquals(product.getAttribute("att2").getDescription(), "description"); ProductRelease product2 = new ProductRelease("name2", "version", "description", atts); product.setId(new Long(2)); assertEquals(product2.equals(product), false); }
public ProductRelease() { attributes = new HashSet<Attribute>(); metadatas = new HashSet<Metadata>(); }
ProductRelease { public ProductRelease() { attributes = new HashSet<Attribute>(); metadatas = new HashSet<Metadata>(); } }
ProductRelease { public ProductRelease() { attributes = new HashSet<Attribute>(); metadatas = new HashSet<Metadata>(); } ProductRelease();  ProductRelease(String product, String version);  ProductRelease(String name, String version, String description, Set<Attribute> attributes); }
ProductRelease { public ProductRelease() { attributes = new HashSet<Attribute>(); metadatas = new HashSet<Metadata>(); } ProductRelease();  ProductRelease(String product, String version);  ProductRelease(String name, String version, String description, Set<Attribute> attributes); void addAttribute(Attribute attribute); void addMetadata(Metadata metadata); void deleteMetadata(Metadata metadata); void deleteAttribute(Attribute attribute); @Override boolean equals(Object obj); void fromSdcJson(JSONObject jsonNode); Attribute getAttribute(String key); Set<Attribute> getAttributes(); String getDescription(); Long getId(); Metadata getMetadata(String key); Set<Metadata> getMetadatas(); String getName(); String getProduct(); List<OS> getSupportedOOSS(); String getVersion(); Boolean getWithArtifact(); String getTierName(); @Override int hashCode(); void setAttributes(Set<Attribute> attributes); void setDescription(String description); void setId(Long id); void setMetadatas(Set<Metadata> metadatas); void setName(String name); void setProduct(String product); void setSupportedOOSS(List<OS> supportedOOSS); void setVersion(String version); void setWithArtifact(Boolean withArtifact); void setTierName(String tierName); ProductReleaseDto toDto(); String toString(); }
ProductRelease { public ProductRelease() { attributes = new HashSet<Attribute>(); metadatas = new HashSet<Metadata>(); } ProductRelease();  ProductRelease(String product, String version);  ProductRelease(String name, String version, String description, Set<Attribute> attributes); void addAttribute(Attribute attribute); void addMetadata(Metadata metadata); void deleteMetadata(Metadata metadata); void deleteAttribute(Attribute attribute); @Override boolean equals(Object obj); void fromSdcJson(JSONObject jsonNode); Attribute getAttribute(String key); Set<Attribute> getAttributes(); String getDescription(); Long getId(); Metadata getMetadata(String key); Set<Metadata> getMetadatas(); String getName(); String getProduct(); List<OS> getSupportedOOSS(); String getVersion(); Boolean getWithArtifact(); String getTierName(); @Override int hashCode(); void setAttributes(Set<Attribute> attributes); void setDescription(String description); void setId(Long id); void setMetadatas(Set<Metadata> metadatas); void setName(String name); void setProduct(String product); void setSupportedOOSS(List<OS> supportedOOSS); void setVersion(String version); void setWithArtifact(Boolean withArtifact); void setTierName(String tierName); ProductReleaseDto toDto(); String toString();  }