in test-utils/src/main/java/org/apache/commons/chain2/testutils/HasLog.java [46:58]
protected boolean matchesSafely(Context item, Description mismatchDescription) {
StringBuilder log = (StringBuilder) item.get("log");
if (log == null) {
mismatchDescription.appendText("context has no log ");
return false;
}
String actualContent = log.toString();
if (!actualContent.equals(expectedContent)) {
mismatchDescription.appendText("log has content ").appendValue(actualContent);
return false;
}
return true;
}