public void testClear() throws Exception {
ServiceAccountantManager instance = ServiceAccountantManager.getInstance();
instance.setAutoCreateAccountant(true);
AdWordsUser testUser = new AdWordsUser("test_data/test.properties");
CampaignServiceInterface campaignService =
testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
campaignService.get(new CampaignSelector());
campaignService = testUser.getService(AdWordsService.V200909.CAMPAIGN_SERVICE);
campaignService.get(new CampaignSelector());
instance.clear();
assertTrue("Services were not removed.", instance.getNumberRegisteredServices() == 0);
assertTrue("Services were not removed.", instance.getNumberRegisteredServices(testUser) == 0);