IsNotANumber extends TypeSafeMatcher<N> { @Override public void describeTo(final Description description) { description.appendText(" not a number (i.e. Double.NaN or Float.NaN)"); }  static Matcher<N> notANumber(); @Override void describeTo(final Description description);  }
@Test public void testDescribeTo() throws Exception { assertIsDescribedTo("not a number (i.e. Double.NaN or Float.NaN)", isNotANumberMatcher); }