AdWordsUser testUser2 = new AdWordsUser("test_data/test.properties");
CampaignServiceInterface campaignService1 =
testUser1.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
CampaignServiceInterface campaignService2 =
testUser2.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
campaignService1.get(new CampaignSelector());
campaignService2.get(new CampaignSelector());
instance.setRetainServices(true);
CampaignServiceInterface campaignService3 =
testUser1.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
CampaignServiceInterface campaignService4 =
testUser2.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
campaignService3.get(new CampaignSelector());
campaignService4.get(new CampaignSelector());
assertEquals(4, instance.getNumberRegisteredServices());
assertEquals(2, instance.getNumberRetainedServices());
assertEquals(campaignService3, instance.getRetainedServicesForUser(testUser1)[0]);
assertEquals(campaignService4, instance.getRetainedServicesForUser(testUser2)[0]);