public synchronized void dumpToLog(HttpRequest httpRequest) {
if (httpRequest != null) {
ExpectationSerializer expectationSerializer = new ExpectationSerializer();
for (Expectation expectation : new ArrayList<Expectation>(expectations)) {
if (expectation.matches(httpRequest)) {
requestLogger.warn(cleanBase64Response(expectationSerializer.serialize(expectation)));
}
}
} else {
ExpectationSerializer expectationSerializer = new ExpectationSerializer();
for (Expectation expectation : new ArrayList<Expectation>(expectations)) {