### Question:
DependencyPath { @VisibleForTesting public DependencyPath append(Dependency dependency) { DependencyPath copy = new DependencyPath(root); copy.path.addAll(path); copy.path.add(dependency); return copy; } DependencyPath(@Nullable Artifact root); @VisibleForTesting DependencyPath append(Dependency dependency); DependencyPath concat(DependencyPath childPath); int size(); Artifact getLeaf(); ImmutableList<String> getArtifactKeys(); Artifact get(int i); Dependency getDependency(int i); Artifact findExclusion(String groupId, String artifactId); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testEquals_nullOptional() { DependencyPath path1 = new DependencyPath(null) .append(new Dependency(foo, "compile")) .append(new Dependency(bar, "compile")); DependencyPath path2 = new DependencyPath(null) .append(new Dependency(foo, "compile")) .append(new Dependency(bar, "compile", null)); new EqualsTester().addEqualityGroup(path1, path2).testEquals(); }