OAuth1aHeaders { public Map<String, String> getOAuthEchoHeaders(TwitterAuthConfig authConfig, TwitterAuthToken authToken, String callback, String method, String url, Map<String, String> postParams) { final Map<String, String> headers = new HashMap<>(2); final String authorizationHeader = getAuthorizationHeader(authConfig, authToken, callback, method, url, postParams); headers.put(HEADER_AUTH_CREDENTIALS, authorizationHeader); headers.put(HEADER_AUTH_SERVICE_PROVIDER, url); return headers; }  String getAuthorizationHeader(TwitterAuthConfig authConfig,
            TwitterAuthToken authToken, String callback, String method, String url,
            Map<String, String> postParams); Map<String, String> getOAuthEchoHeaders(TwitterAuthConfig authConfig,
            TwitterAuthToken authToken, String callback, String method, String url,
            Map<String, String> postParams); static final String HEADER_AUTH_SERVICE_PROVIDER; static final String HEADER_AUTH_CREDENTIALS; }
@Test public void testGetOAuthEchoHeaders() throws Exception { final TwitterAuthConfig config = mock(TwitterAuthConfig.class); final TwitterAuthToken token = mock(TwitterAuthToken.class); final Map<String, String> headers = oAuthHeaders.getOAuthEchoHeaders(config, token, null, "GET", VERIFY_CREDENTIALS_URL, null); assertEquals(VERIFY_CREDENTIALS_URL, headers.get(OAuth1aHeaders .HEADER_AUTH_SERVICE_PROVIDER)); assertEquals(ANY_AUTH_CREDENTIALS, headers.get(OAuth1aHeaders .HEADER_AUTH_CREDENTIALS)); }