IsEquivalent extends TypeSafeMatcher<T> { @Override public void describeTo(final Description description) { description.appendText("a value equivalent to ").appendValue(comparison) .appendText(" according with Equivalence ").appendValue(equivalence); } IsEquivalent(final T comparison, final Equivalence<T> equivalence); static Matcher<T> equivalentTo(final T expected, final Equivalence<T> equivalence); @Override void describeTo(final Description description);  }
@Test public void testDescribeTo() throws Exception { BaseMatcherTest.assertIsDescribedTo(String.format("a value equivalent to <%s> according with Equivalence <%s>", COMPARISON_OBJECT_TO_STRING_VAL, EQUIVALENCE_TO_STRING), isEquivalentMatcher); }