@Test
public void testHashMethod() {

  TargetQualifierMapKey key1 = new TargetQualifierMapKey(TARGET_NAME_1, "qualifier");
  TargetQualifierMapKey key2 = new TargetQualifierMapKey(new FullQualifiedName("namespace", "name"), "qualifier");
  assertEquals(key1.hashCode(), key1.hashCode());
  key1 = new TargetQualifierMapKey(TARGET_NAME_1, "qualifier");
  key2 = new TargetQualifierMapKey(new FullQualifiedName("namespace", "name"), "qualifier");
  assertEquals(key1.hashCode(), key2.hashCode());
  key1 = new TargetQualifierMapKey(TARGET_NAME_1, null);
  key2 = new TargetQualifierMapKey(TARGET_NAME_1, null);
  assertEquals(key1.hashCode(), key2.hashCode());
  key1 = new TargetQualifierMapKey(TARGET_NAME_1, null);
  key2 = new TargetQualifierMapKey(new FullQualifiedName("namespace", "name"), null);
  assertEquals(key1.hashCode(), key2.hashCode());
  key1 = new TargetQualifierMapKey(TARGET_NAME_1, "qualifier");
  key2 = new TargetQualifierMapKey(TARGET_NAME_1, null);
  assertNotSame(key1.hashCode(), key2.hashCode());
  key1 = new TargetQualifierMapKey(new FullQualifiedName("namespace", "name"), null);
  key2 = new TargetQualifierMapKey(new FullQualifiedName("namespace", "wrong"), null);
  assertNotSame(key1.hashCode(), key2.hashCode());
}