@Test
public void testHasDependencyExcludingVersionWhenDependencyHasDifferentVersion() {
// Set up
final String existingVersion = "1.0";
final Dependency mockExistingDependency = getMockDependency(
DEPENDENCY_GROUP_ID, DEPENDENCY_ARTIFACT_ID, existingVersion,
DependencyType.JAR);
final Pom pom = getMinimalPom(JAR, mockExistingDependency);
final Dependency mockOtherDependency = getMockDependency(
DEPENDENCY_GROUP_ID, DEPENDENCY_ARTIFACT_ID, existingVersion
+ ".1", DependencyType.JAR);
// Invoke and check
assertTrue(pom.hasDependencyExcludingVersion(mockOtherDependency));