IsValidNoArgumentConstructor extends TypeSafeMatcher<Class> { @Override protected void describeMismatchSafely(final Class aClass, final Description mismatchDescription) { mismatchDescription.appendValue(aClass).appendText(" has not valid no-argument constructor"); } private  IsValidNoArgumentConstructor(); static Matcher<Class> hasNoArgumentConstructor(); @Override void describeTo(final Description description);  }
@Test public void testDescribeMismatchSafely() throws Exception { assertHasMismatchDescription(format("<%s> has not valid no-argument constructor", nonValidClass), isValidNoArgumentConstructorMatcher, nonValidClass); }