### Question:
UnresolvableArtifactProblem extends ArtifactProblem { @Override public String toString() { if (dependencyPath.isEmpty()) { return artifact + " was not resolved. Dependency path is unknown."; } else { return artifact + " was not resolved. Dependency path: " + getPath(); } } UnresolvableArtifactProblem(Artifact artifact);  UnresolvableArtifactProblem(List<DependencyNode> dependencyPath); @Override String toString();  }### Answer:
@Test public void testToString_unresolvableArtifactWithoutDependencyPath() { UnresolvableArtifactProblem problem = new UnresolvableArtifactProblem(artifactA); assertEquals( "foo:a:jar:1.0.0 was not resolved. Dependency path is unknown.", problem.toString()); }
@Test public void testToString_unresolvableArtifact() { UnresolvableArtifactProblem problem = new UnresolvableArtifactProblem(ImmutableList.of(nodeA, nodeB, nodeC)); assertEquals( "foo:c:jar:1.0.0 was not resolved. Dependency path: " + "foo:a:jar:1.0.0 (compile) > foo:b:jar:1.0.0 (provided) > foo:c:jar:1.0.0 (runtime)", problem.toString()); }