@Test
void shouldLogCompleteRequest() throws IOException {

    final String correlationId = "3ce91230-677b-11e5-87b7-10ddb1ee7671";
    final HttpRequest request = MockHttpRequest.create()
            .withMethod("POST")
            .withProtocolVersion("HTTP/1.0")
            .withOrigin(REMOTE)
            .withPath("/test")
            .withQuery("limit=1")
            .withHeaders(HttpHeaders.empty()
                    .update("Accept", "application/json")
                    .update("Content-Type", "application/json")
                    .update("Date", "Tue, 15 Nov 1994 08:12:31 GMT"))
            .withContentType("application/xml")
            .withBodyAsString("<action>test</action>");
    final String format = unit.format(correlation(correlationId), request);
    assertThat(format, stringContainsInOrder(
            "origin=remote",
            "type=request",
            "correlation=3ce91230-677b-11e5-87b7-10ddb1ee7671",
            "protocol=HTTP/1.0",
            "remote=127.0.0.1",
            "method=POST",
            "uri=http://localhost/test?limit=1",
            "headers={",
            "Accept=[application/json]",
            "Content-Type=[application/json]",
            "Date=[Tue, 15 Nov 1994 08:12:31 GMT]",
            "}",
            "body=<action>test</action>"
    ));
}