### Question:
Dependency implements Comparable<Dependency> { public static boolean isHigherLevel(final String type1, final String type2) { final int type1Index = TYPE_HIERARCHY.indexOf(type1.toLowerCase()); final int type2Index = TYPE_HIERARCHY.indexOf(type2.toLowerCase()); return type2Index >= 0 && type1Index > type2Index; } 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 testEarIsHigherThanJar() { assertTrue(Dependency.isHigherLevel("ear", "jar")); }
@Test public void testEarIsHigherThanWar() { assertTrue(Dependency.isHigherLevel("ear", "war")); }
@Test public void testJarIsNotHigherThanItself() { assertFalse(Dependency.isHigherLevel("jar", "jar")); }
@Test public void testJarIsNotHigherThanWar() { assertFalse(Dependency.isHigherLevel("jar", "war")); }
@Test public void testPomIsHigherThanWar() { assertTrue(Dependency.isHigherLevel("ear", "war")); }
@Test public void testWarIsHigherThanJar() { assertTrue(Dependency.isHigherLevel("war", "jar")); }