@Test
public void testAuthenticateSkipTokenAuthCookieAuth() throws ServiceUnavailableException {

  attr.set(Attribute.SKIP_TOKEN_AUTH, true);
  authenticator = new GoogleAppEngineAuthenticator(oauthService, userService) {
    @Override
    boolean shouldTryCookieAuth(ApiMethodConfig config) {
      return true;
    }
  };
  when(userService.getCurrentUser()).thenReturn(APP_ENGINE_USER);
  assertEquals(USER, authenticator.authenticate(request));
  assertEquals(APP_ENGINE_USER, attr.get(Attribute.AUTHENTICATED_APPENGINE_USER));
}