IsEqualToMatcher extends AbstractSimpleMatcher { @Override protected boolean matches(Parameter parameter, Object actual, Object expected) { return Objects.equals(actual, expected); }    }
@Test public void testWhenBothAreNull() { assertThat(new IsEqualToMatcher().matches(null, null, new Object[]{null}), is(true)); }
@Test public void testWhenTheyAreTheSameInstance() { final Object obj = new Object(); assertThat(new IsEqualToMatcher().matches(null, obj, obj), is(true)); }
@Test public void testWhenTheyHaveTheSameValue() { assertThat(new IsEqualToMatcher().matches(null, 1, 1), is(true)); }
@Test public void testWhenTheyDiffer() { assertThat(new IsEqualToMatcher().matches(null, new Object(), new Object()), is(false)); }
@Test public void testWhenTheyHaveDifferentValues() { assertThat(new IsEqualToMatcher().matches(null, 1, 2), is(false)); }