@Test
public void testAuditLoggingForPut() throws Exception {

  RequestContext requestContext = mock(RequestContext.class);
  Request request = Request.forUri("/", "PUT")
      .withPayload(ByteString.encodeUtf8("hello"));
  when(requestContext.request()).thenReturn(request);
  Response<Object> response = awaitResponse(Middlewares.httpLogger(authenticator)
      .apply(mockInnerHandler(requestContext))
      .invoke(requestContext));
  assertThat(response, hasStatus(withCode(Status.OK)));
}