OAuth1aService extends OAuthService { public void requestTempToken(final Callback<OAuthResponse> callback) { final TwitterAuthConfig config = getTwitterCore().getAuthConfig(); final String url = getTempTokenUrl(); api.getTempToken(new OAuth1aHeaders().getAuthorizationHeader(config, null, buildCallbackUrl(config), "POST", url, null)).enqueue(getCallbackWrapper(callback)); } OAuth1aService(TwitterCore twitterCore, TwitterApi api); void requestTempToken(final Callback<OAuthResponse> callback); String buildCallbackUrl(TwitterAuthConfig authConfig); void requestAccessToken(final Callback<OAuthResponse> callback,
            TwitterAuthToken requestToken, String verifier); String getAuthorizeUrl(TwitterAuthToken requestToken); static OAuthResponse parseAuthResponse(String response);  }
@Test public void testRequestTempToken() { service.api = new MockOAuth1aService() { @Override public Call<ResponseBody> getTempToken(@Header(OAuthConstants.HEADER_AUTHORIZATION) String auth) { assertTrue(auth.contains(OAuthConstants.PARAM_CALLBACK)); return super.getTempToken(auth); } }; service.requestTempToken(mock(Callback.class)); }