public void shouldLogMessageIndicatingFailedHeaderMatch() {
context.checking(new Expectations() {{
one(notifier).info("URL /for/logging is match, but header Content-Type is not. For a match, value should equal text/xml");
}});
RequestPattern requestPattern = new RequestPattern(POST, "/for/logging");
ValuePattern headerPattern = new ValuePattern();
headerPattern.setEqualTo("text/xml");
requestPattern.addHeader("Content-Type", headerPattern);
Request request = aRequest(context)
.withUrl("/for/logging")
.withMethod(POST)
.withHeader("Content-Type", "text/plain")
.build();
requestPattern.isMatchedBy(request);
}