@Test public void testSetAuthenticationHeaders() throws Exception { Credential credential = new Credential(BearerToken.authorizationHeaderAccessMethod()); Object soapClient = new Object(); Map<String, Object> headerElements = new HashMap<String, Object>(); AdWordsSession adWordsSession = new AdWordsSession.Builder().withOAuth2Credential(credential) .withDeveloperToken("developerToken").withUserAgent(USER_AGENT).build(); headerHandler.setAuthenticationHeaders(soapClient, headerElements, adWordsSession); verify(authorizationHeaderHandler).setAuthorization(soapClient, adWordsSession); }
@VisibleForTesting void setAuthenticationHeaders(Object soapClient, Map<String, Object> headerElements, AdWordsSession adWordsSession) throws AuthenticationException { authorizationHeaderHandler.setAuthorization(soapClient, adWordsSession); }
AdWordsJaxWsHeaderHandler implements
    HeaderHandler<AdWordsSession, AdWordsServiceDescriptor> { @VisibleForTesting void setAuthenticationHeaders(Object soapClient, Map<String, Object> headerElements, AdWordsSession adWordsSession) throws AuthenticationException { authorizationHeaderHandler.setAuthorization(soapClient, adWordsSession); } }
AdWordsJaxWsHeaderHandler implements
    HeaderHandler<AdWordsSession, AdWordsServiceDescriptor> { @VisibleForTesting void setAuthenticationHeaders(Object soapClient, Map<String, Object> headerElements, AdWordsSession adWordsSession) throws AuthenticationException { authorizationHeaderHandler.setAuthorization(soapClient, adWordsSession); } @Inject  AdWordsJaxWsHeaderHandler(
      JaxWsHandler soapClientHandler,
      AdWordsApiConfiguration adWordsApiConfiguration,
      AdsLibConfiguration adsLibConfiguration,
      AuthorizationHeaderHandler authorizationHeaderHandler,
      UserAgentCombiner userAgentCombiner); }
AdWordsJaxWsHeaderHandler implements
    HeaderHandler<AdWordsSession, AdWordsServiceDescriptor> { @VisibleForTesting void setAuthenticationHeaders(Object soapClient, Map<String, Object> headerElements, AdWordsSession adWordsSession) throws AuthenticationException { authorizationHeaderHandler.setAuthorization(soapClient, adWordsSession); } @Inject  AdWordsJaxWsHeaderHandler(
      JaxWsHandler soapClientHandler,
      AdWordsApiConfiguration adWordsApiConfiguration,
      AdsLibConfiguration adsLibConfiguration,
      AuthorizationHeaderHandler authorizationHeaderHandler,
      UserAgentCombiner userAgentCombiner); @Override void setHeaders(Object soapClient, AdWordsSession adWordsSession,
      AdWordsServiceDescriptor adWordsServiceDescriptor); }
AdWordsJaxWsHeaderHandler implements
    HeaderHandler<AdWordsSession, AdWordsServiceDescriptor> { @VisibleForTesting void setAuthenticationHeaders(Object soapClient, Map<String, Object> headerElements, AdWordsSession adWordsSession) throws AuthenticationException { authorizationHeaderHandler.setAuthorization(soapClient, adWordsSession); } @Inject  AdWordsJaxWsHeaderHandler(
      JaxWsHandler soapClientHandler,
      AdWordsApiConfiguration adWordsApiConfiguration,
      AdsLibConfiguration adsLibConfiguration,
      AuthorizationHeaderHandler authorizationHeaderHandler,
      UserAgentCombiner userAgentCombiner); @Override void setHeaders(Object soapClient, AdWordsSession adWordsSession,
      AdWordsServiceDescriptor adWordsServiceDescriptor);  }