### Question:
Artifact { public String getDestFileName() { if (destFileName == null) { String[] parts = artifactId.split("-"); String id = parts[0]; if (parts.length > 2) { id = StringUtils.join(Arrays.copyOf(parts, parts.length-1), '-'); } return String.format(DEST_TEMPLATE, id, version, fileExtension); } else { return destFileName; } } Artifact();  Artifact(String artifactId, String version);  Artifact(String artifactId, String version, String groupId);  Artifact(String artifactId, String version, String groupId, String type);  Artifact(String artifactId, String version, String groupId, String type, String fileExtension); String getVersion(); void setVersion(String version); String getGroupId(); void setGroupId(String groupId); String getArtifactId(); void setArtifactId(String artifactId); String getType(); void setType(String type); String getDestFileName(); void setDestFileName(String destFileName); void setClassifier(String classifier); String getClassifier(); String getFileExtension(); void setFileExtension(String fileExtension); Element toElement(String outputDir); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); boolean isValid(); static final String GROUP_MODULE; static final String GROUP_WEB; static final String GROUP_OPENMRS; static final String GROUP_H2; static final String GROUP_DISTRO; static final String TYPE_OMOD; static final String TYPE_WAR; static final String TYPE_JAR; static final String TYPE_ZIP; static final String DEST_TEMPLATE; }### Answer:
@Test public void testGetDestFileName() throws Exception{ Artifact nodashes = new Artifact("modulename-omod","1.4-SNAPSHOT"); assertThat(nodashes.getDestFileName(), is("modulename-1.4-SNAPSHOT.jar")); Artifact withdashes = new Artifact("modulename-submodule-omod","1.2"); assertThat(withdashes.getDestFileName(), is("modulename-submodule-1.2.jar")); Artifact withdoubledashes = new Artifact("modulename-submodule-subsubmodule-omod","5.7.1"); assertThat(withdoubledashes.getDestFileName(), is("modulename-submodule-subsubmodule-5.7.1.jar")); }