@Test
public void testLogRequestResponseHeaders(TestContext context){

    EventBus eventBus = Mockito.mock(EventBus .class);
    CaseInsensitiveHeaders headers = new CaseInsensitiveHeaders();
    headers.add("Content-Type", "application/json");
    headers.add("x-rp-unique-id", "123456");
    MockedRequest request = new MockedRequest("/uri/to/a/resource", HttpMethod.PUT, headers,
            new MockedResponse(new CaseInsensitiveHeaders()));
    JsonObject body = new JsonObject().put("key_1", "value_2").put("key_2", 99);
    CaseInsensitiveHeaders responseHeaders = new CaseInsensitiveHeaders();
    responseHeaders.add("header_1", "value_1");
    responseHeaders.add("header_2", "value_2");
    RequestLogger.logRequest(eventBus, request, StatusCode.OK.getStatusCode(), Buffer.buffer(body.encode()), responseHeaders);
    JsonObject expected = new JsonObject();
    expected.put(REQUEST_URI, "/uri/to/a/resource");
    expected.put(REQUEST_METHOD, "PUT");
    JsonObject requestHeaders = new JsonObject().put("Content-Type", "application/json").put("x-rp-unique-id", "123456");
    expected.put(REQUEST_HEADERS, requestHeaders);
    JsonObject responseHeadersJsonObject = new JsonObject().put("header_1", "value_1").put("header_2", "value_2");
    expected.put(RESPONSE_HEADERS, responseHeadersJsonObject);
    expected.put(REQUEST_STATUS, StatusCode.OK.getStatusCode());
    expected.put(BODY, Buffer.buffer(body.encode()).toString());
    Mockito.verify(eventBus, Mockito.times(1))
            .send(eq(Address.requestLoggingConsumerAddress()), eq(expected), any(Handler.class));
}