@Test public void testGetServiceClientAsInterface() { MockSoapClientInterface soapClient = new MockSoapClient(); when(adsServiceClientFactory.getServiceClient(adsSession, MockSoapClientInterface.class)) .thenReturn(soapClient); MockSoapClientInterface testSoapClient = baseAdsServiceClientFactory.getServiceClientAsInterface(adsSession, MockSoapClientInterface.class); assertSame(soapClient, testSoapClient); }
public <T> T getServiceClientAsInterface(S adsSession, Class<T> interfaceClass) throws ServiceException { return adsServiceClientFactory.getServiceClient(adsSession, interfaceClass); }
BaseAdsServiceClientFactory { public <T> T getServiceClientAsInterface(S adsSession, Class<T> interfaceClass) throws ServiceException { return adsServiceClientFactory.getServiceClient(adsSession, interfaceClass); } }
BaseAdsServiceClientFactory { public <T> T getServiceClientAsInterface(S adsSession, Class<T> interfaceClass) throws ServiceException { return adsServiceClientFactory.getServiceClient(adsSession, interfaceClass); } protected  BaseAdsServiceClientFactory(AdsServiceClientFactory<C, S, D> adsServiceClientFactory); protected  BaseAdsServiceClientFactory(AbstractModule module); @SuppressWarnings("unchecked") /* Guice binding for AdsServiceClientFactory does not include * type arguments because each subclass of * BaseAdsServiceClientFactory is bound in the SOAP * toolkit-agnostic AdsSoapModule module. Therefore, * must use the raw type here. */ protected  BaseAdsServiceClientFactory(Injector injector); }
BaseAdsServiceClientFactory { public <T> T getServiceClientAsInterface(S adsSession, Class<T> interfaceClass) throws ServiceException { return adsServiceClientFactory.getServiceClient(adsSession, interfaceClass); } protected  BaseAdsServiceClientFactory(AdsServiceClientFactory<C, S, D> adsServiceClientFactory); protected  BaseAdsServiceClientFactory(AbstractModule module); @SuppressWarnings("unchecked") /* Guice binding for AdsServiceClientFactory does not include * type arguments because each subclass of * BaseAdsServiceClientFactory is bound in the SOAP * toolkit-agnostic AdsSoapModule module. Therefore, * must use the raw type here. */ protected  BaseAdsServiceClientFactory(Injector injector); T getServiceClientAsInterface(S adsSession, Class<T> interfaceClass); }
BaseAdsServiceClientFactory { public <T> T getServiceClientAsInterface(S adsSession, Class<T> interfaceClass) throws ServiceException { return adsServiceClientFactory.getServiceClient(adsSession, interfaceClass); } protected  BaseAdsServiceClientFactory(AdsServiceClientFactory<C, S, D> adsServiceClientFactory); protected  BaseAdsServiceClientFactory(AbstractModule module); @SuppressWarnings("unchecked") /* Guice binding for AdsServiceClientFactory does not include * type arguments because each subclass of * BaseAdsServiceClientFactory is bound in the SOAP * toolkit-agnostic AdsSoapModule module. Therefore, * must use the raw type here. */ protected  BaseAdsServiceClientFactory(Injector injector); T getServiceClientAsInterface(S adsSession, Class<T> interfaceClass);  }