@Test
public void readsContentOfEntityStreamAsStreamSource() throws Exception {

    StreamSource streamSource = streamSourceEntityProvider.readFrom(StreamSource.class, null, null, APPLICATION_XML_TYPE, new MultivaluedMapImpl(),
                                                              new ByteArrayInputStream(TEST_XML_CONTENT_BYTES));
    Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(streamSource.getInputStream());
    assertThatXmlDocumentContainsAllExpectedNodes(document);
}