@Test
public void testGetOAuth2UserUserFailure() throws Exception {

  when(config.getScopeExpression()).thenReturn(AuthScopeExpressions.interpret(SCOPES));
  when(oauthService.getAuthorizedScopes(SCOPES)).thenReturn(SCOPES);
  when(oauthService.getClientId(SCOPES)).thenReturn(CLIENT_ID);
  when(config.getClientIds()).thenReturn(ImmutableList.of(CLIENT_ID));
  when(oauthService.getCurrentUser(SCOPES)).thenReturn(null);
  assertNull(authenticator.getOAuth2User(request, config));
}