### Question:
Dependency implements Comparable<Dependency> { public boolean hasSameCoordinates(final Dependency dependency) { return dependency != null && compareCoordinates(dependency) == 0; } Dependency(final Element dependency);  Dependency(final GAV gav, final DependencyType type, final DependencyScope scope);  Dependency(final String groupId, final String artifactId, final String version);  Dependency(final String groupId, final String artifactId, final String version,
      final Collection<? extends Dependency> exclusions);  Dependency(final String groupId, final String artifactId, final String version,
      final DependencyType type, final DependencyScope scope);  Dependency(final String groupId, final String artifactId, final String version,
      final DependencyType type, final DependencyScope scope, final String classifier); static boolean isHigherLevel(final String type1, final String type2); void addExclusion(final String exclusionGroupId, final String exclusionArtifactId); int compareTo(final Dependency o); @Override boolean equals(final Object obj); String getArtifactId(); String getClassifier(); Element getElement(final Document document); List<Dependency> getExclusions(); String getGroupId(); DependencyScope getScope(); String getSimpleDescription(); String getSystemPath(); DependencyType getType(); String getVersion(); @Deprecated String getVersionId(); @Override int hashCode(); boolean hasSameCoordinates(final Dependency dependency); @Override String toString();  }### Answer:
@Test public void testNullDependencyDoesNotHaveSameCoordinates() { final Dependency dependency = new Dependency(DEPENDENCY_GROUP_ID, DEPENDENCY_ARTIFACT_ID, DEPENDENCY_VERSION); final boolean same = dependency.hasSameCoordinates(null); assertFalse(same); }