@Test public void testCidChangeInAdWordsSession() throws ValidationException { AdWordsSession session = AdWordsSessionUtilTest.getTestAdWordsSessionWithoutCid(); session.setClientCustomerId(TEST_CID1); Object obj = new Object(); ApiRetryStrategy retryStrategy = ApiReportingRetryStrategy.newInstance(); ApiInvocationHandlerWithRateLimiter awapiInvocationHandler = new ApiInvocationHandlerWithRateLimiter(obj, session, retryStrategy); assertSame( "Same adwords session object check.", session, awapiInvocationHandler.getAdWordsSession()); assertTrue( "AdWordsSession cid1 check", awapiInvocationHandler.getAdWordsSession().getClientCustomerId().equals(TEST_CID1)); session.setClientCustomerId(TEST_CID2); assertSame( "Same adwords session object check.", session, awapiInvocationHandler.getAdWordsSession()); assertTrue( "AdWordsSession cid2 check", awapiInvocationHandler.getAdWordsSession().getClientCustomerId().equals(TEST_CID2)); }
@VisibleForTesting protected AdWordsSession getAdWordsSession() { return session; }
ApiInvocationHandlerWithRateLimiter extends AbstractInvocationHandler { @VisibleForTesting protected AdWordsSession getAdWordsSession() { return session; } }
ApiInvocationHandlerWithRateLimiter extends AbstractInvocationHandler { @VisibleForTesting protected AdWordsSession getAdWordsSession() { return session; } ApiInvocationHandlerWithRateLimiter(
      Object objectToProxy, AdWordsSession session, ApiRetryStrategy retryStrategy); }
ApiInvocationHandlerWithRateLimiter extends AbstractInvocationHandler { @VisibleForTesting protected AdWordsSession getAdWordsSession() { return session; } ApiInvocationHandlerWithRateLimiter(
      Object objectToProxy, AdWordsSession session, ApiRetryStrategy retryStrategy); @Override Object handleInvocation(Object proxy, Method method, Object[] args); }
ApiInvocationHandlerWithRateLimiter extends AbstractInvocationHandler { @VisibleForTesting protected AdWordsSession getAdWordsSession() { return session; } ApiInvocationHandlerWithRateLimiter(
      Object objectToProxy, AdWordsSession session, ApiRetryStrategy retryStrategy); @Override Object handleInvocation(Object proxy, Method method, Object[] args);  }