public static void assertDescription(String expected, Matcher<?> matcher) { Description description = new StringDescription(); description.appendDescriptionOf(matcher); assertEquals("Expected description", expected, description.toString().trim()); }