IsSame extends BaseMatcher<Object> { @Override public void describeTo(final Description description) { description.appendText("same instance of ").appendValue(object); } IsSame(final Object object); static Matcher sameInstance(final Object target); @Override boolean matches(final Object arg); @Override void describeTo(final Description description);  }
@Test public void testDescribeTo() throws Exception { assertIsDescribedTo(String.format("same instance of <%s>", comparison), sameInstanceMatcher); }