PomModel extends TransformationUtility<PomModel> { public PomModel setArtifact(String artifactInfo) { checkForBlankString("artifactInfo", artifactInfo); String[] artifactInfoArray = artifactInfo.split(":"); if (artifactInfoArray.length != 3) { throw new TransformationDefinitionException("Artifact info should be specified as [groupId]:[artifactId]:[version]"); } setGroupId(artifactInfoArray[0]); setArtifactId(artifactInfoArray[1]); setVersion(artifactInfoArray[2]); return this; } PomModel();  PomModel(String groupId, String artifactId, String version);  PomModel(String groupId, String artifactId, String version, String repoURI); PomModel setArtifact(String artifactInfo); PomModel setGroupId(String groupId); String getGroupId(); PomModel setArtifactId(String artifactId); String getArtifactId(); PomModel setVersion(String version); String getVersion(); PomModel setRepoURI(String repoURI); String getRepoURI(); @Override String getDescription();  }
@Test public void improperArtifactInfoTest() { try { new PomModel().setArtifact("asdf"); assertTrue(false); } catch (TransformationDefinitionException e) { assertEquals(e.getMessage(), "Artifact info should be specified as [groupId]:[artifactId]:[version]"); } }
@Test public void nullArtifactInfoTest() { try { new PomModel().setArtifact(null); assertTrue(false); } catch (TransformationDefinitionException e) { assertEquals(e.getMessage(), "artifactInfo cannot be blank"); } }