### Question:
ClassPathEntry { @Override public String toString() { if (artifact != null) { return Artifacts.toCoordinates(artifact); } else { return jar.toString(); } } ClassPathEntry(Path jar);  ClassPathEntry(Artifact artifact); Artifact getArtifact(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); synchronized ImmutableSet<String> getFileNames();  }### Answer:
@Test public void testToStringJar() { ClassPathEntry entry = new ClassPathEntry(fooJar); assertEquals("foo.jar", entry.toString()); }
@Test public void testToStringArtifact() { ClassPathEntry entry = new ClassPathEntry(fooArtifact); assertEquals("com.google:foo:0.0.1", entry.toString()); }