### Question:
Dependencies { public static boolean areEquivalent(Dependency l, Dependency r) { if (l == r) { return true; } if ((l == null) && (r == null)) { return true; } else if ((l == null) || (r == null)) { return false; } return areEquivalent(l.getCoordinate(), r.getCoordinate()); }  static boolean areEquivalent(Dependency l, Dependency r); static boolean areEquivalent(Coordinate l, Coordinate r);  }### Answer:
@Test public void testAreEquivalentDependencyDependency() { Dependency depOne = DependencyBuilder.create().setGroupId("org.jboss.errai").setArtifactId("errai-cdi-client") .setPackaging("jar"); Dependency depTwo = DependencyBuilder.create().setGroupId("org.jboss.errai").setArtifactId("errai-cdi-client") .setPackaging("test-jar"); Assert.assertFalse(Dependencies.areEquivalent(depOne, depTwo)); }
@Test public void testAreEquivalentCoordinateCoordinate() { Dependency depOne = DependencyBuilder.create().setGroupId("org.jboss.errai").setArtifactId("errai-cdi-client") .setPackaging("jar"); Dependency depTwo = DependencyBuilder.create().setGroupId("org.jboss.errai").setArtifactId("errai-cdi-client") .setPackaging("test-jar"); Assert.assertFalse(Dependencies.areEquivalent(depOne, depTwo)); }