IsInfinity extends TypeSafeMatcher<N> { @Override public void describeTo(final Description description) { description.appendText("a value equals to infinite (positive or negative)"); }  static Matcher<N> infinity(); @Override void describeTo(final Description description);  }
@Test public void testDescribeTo() throws Exception { assertIsDescribedTo("a value equals to infinite (positive or negative)", isInfinityMatcher); }