### Question:
Dependency implements Comparable<Dependency> { public void addExclusion(final String exclusionGroupId, final String exclusionArtifactId) { Validate.notBlank(exclusionGroupId, "Excluded groupId required"); Validate.notBlank(exclusionArtifactId, "Excluded artifactId required"); exclusions.add(new Dependency(exclusionGroupId, exclusionArtifactId, "ignored")); } 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 testAddExclusion() { final Dependency dependency = new Dependency(DEPENDENCY_GROUP_ID, DEPENDENCY_ARTIFACT_ID, DEPENDENCY_VERSION); final int originalExclusionCount = dependency.getExclusions().size(); dependency.addExclusion(EXCLUSION_GROUP_ID, EXCLUSION_ARTIFACT_ID); assertEquals(originalExclusionCount + 1, dependency.getExclusions().size()); }