Artifact { @JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnore public String getGavc(){ final StringBuilder sb = new StringBuilder(); sb.append(groupId); sb.append(":"); sb.append(artifactId); sb.append(":"); sb.append(version); sb.append(":"); sb.append(classifier); sb.append(":"); sb.append(extension); return sb.toString(); } protected  Artifact(); String getArtifactId(); void setArtifactId(final String artifactId); String getGroupId(); void setGroupId(final String groupId); String getVersion(); void setVersion(final String version); String getType(); void setType(final String type); String getSha256(); void setSha256(String sha256); boolean isPromoted(); void setPromoted(final boolean promoted); String getClassifier(); void setClassifier(final String classifier); List<String> getLicenses(); void setLicenses(final List<String> licenses); void addLicense(final String licenseName); String getSize(); void setSize(final String size); String getDownloadUrl(); void setDownloadUrl(final String downloadUrl); String getExtension(); void setExtension(final String extension); String getProvider(); void setProvider(final String provider); String getOrigin(); void setOrigin(final String origin); Date getCreatedDateTime(); void setCreatedDateTime(Date createdDateTime); Date getUpdatedDateTime(); void setUpdatedDateTime(Date updatedDateTime); @JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnore String getGavc(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); String getDescription(); void setDescription(String description); boolean isDoNotUse(); void setDoNotUse(boolean doNotUse);  }
@Test public void getArtifactGavc(){ Artifact artifact = DataModelFactory.createArtifact("groupId", "artifactId", "version", "classifier", "type", "extension"); assertEquals("groupId:artifactId:version:classifier:extension", artifact.getGavc()); }