@Test
public void testSuccessfulAuthorization() {

  when(authenticator.authenticate(any())).thenReturn(idToken);
  final Request request = Request.forUri("/", "PUT")
      .withHeader(HttpHeaders.AUTHORIZATION, "Bearer token")
      .withPayload(ByteString.encodeUtf8("hello"));
  final AuthContext authContext = sut.authenticate(request);
  assertThat(authContext.user(), is(Optional.of(idToken)));
}