@Override
    public final boolean match(final Request request) {
        Optional<Document> requestDocument = extractDocument(request, extractor);
        return requestDocument.filter(actual -> tryToMatch(request, actual)).isPresent();
    }
@Test
    public void should_return_false_for_empty_content() {
        XmlRequestMatcher unitUnderTest = new XmlContentRequestMatcher(text("<request><parameters><id>1</id></parameters></request>"), new ContentRequestExtractor());
        HttpRequest request = DefaultHttpRequest.builder().withStringContent("").build();
        assertThat(unitUnderTest.match(request), is(false));
    }