### Question:
Artifacts { public static String toCoordinates(Artifact artifact) { return (artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion()); } private  Artifacts(); static String toCoordinates(Artifact artifact); static String makeKey(Artifact artifact);  }### Answer:
@Test public void testToCoordinates() { Artifact artifact = new DefaultArtifact("com.google.example:example:1.3.2"); Assert.assertEquals("com.google.example:example:1.3.2", Artifacts.toCoordinates(artifact)); }
@Test public void testToCoordinates_withPackaging() { Artifact artifact = new DefaultArtifact("com.google.example", "example", "jar", "1.3.2"); Assert.assertEquals("com.google.example:example:1.3.2", Artifacts.toCoordinates(artifact)); }