Description description = new StringDescription();
description.appendText(reason);
description.appendText("\nExpected: ");
description.appendDescriptionOf(matcher);
if (describeMismatchMethod != null) {
description.appendText("\n but: ");
// matcher.describeMismatch(actual, description);
ReflectionUtils.invokeMethod(describeMismatchMethod, matcher, actual, description);
}
else {
description.appendText("\n got: ");