OAuth2Service extends OAuthService { void requestAppAuthToken(final Callback<OAuth2Token> callback) { api.getAppAuthToken(getAuthHeader(), OAuthConstants.GRANT_TYPE_CLIENT_CREDENTIALS) .enqueue(callback); } OAuth2Service(TwitterCore twitterCore, TwitterApi api); void requestGuestAuthToken(final Callback<GuestAuthToken> callback);  }
@Test public void testRequestAppAuthToken() { service.api = spy(new MockOAuth2Api()); service.requestAppAuthToken(mock(Callback.class)); verify(service.api).getAppAuthToken(EXPECTED_BASIC_AUTH, OAuthConstants.GRANT_TYPE_CLIENT_CREDENTIALS); }