### Question:
AbstractComparator implements Comparator<T, D> { protected boolean checkForInequality(Object left, Object right) { if (left == right) { return false; } if (left == null) { return true; } return !left.equals(right); } AbstractComparator(ComparatorRegistry comparatorRegistry, ComparatorType comparatorType);   }### Answer:
@Test public void checkForInequalityOfSameObject() { EqualObject object = new EqualObject(); assertThat(comparator.checkForInequality(object, object), is(false)); }
@Test public void checkForInequalityLeftNull() { assertThat(comparator.checkForInequality(null, new EqualObject()), is(true)); }
@Test public void checkForInequalityRightNull() { assertThat(comparator.checkForInequality(new EqualObject(), null), is(true)); }
@Test public void checkForInequalityDifferentObject() { Object objectA = new Object(); Object objectB = new Object(); assertThat(comparator.checkForInequality(objectA, objectB), is(true)); }
@Test public void checkForInequalityDifferentObjectEquals() { EqualObject objectA = new EqualObject(); EqualObject objectB = new EqualObject(); assertThat(comparator.checkForInequality(objectA, objectB), is(false)); }