@Test public void addTest() { int id = new Random().nextInt(500); campaigns.add("campaign" + id); assertEquals(1, tracker.getBusinessObjects().size()); }
public Campaign add(String campaignId) { Campaign campaign = new Campaign(tracker) .setCampaignId(campaignId); tracker.getBusinessObjects().put(campaign.getId(), campaign); return campaign; }
Campaigns { public Campaign add(String campaignId) { Campaign campaign = new Campaign(tracker) .setCampaignId(campaignId); tracker.getBusinessObjects().put(campaign.getId(), campaign); return campaign; } }
Campaigns { public Campaign add(String campaignId) { Campaign campaign = new Campaign(tracker) .setCampaignId(campaignId); tracker.getBusinessObjects().put(campaign.getId(), campaign); return campaign; } Campaigns(Tracker tracker); }
Campaigns { public Campaign add(String campaignId) { Campaign campaign = new Campaign(tracker) .setCampaignId(campaignId); tracker.getBusinessObjects().put(campaign.getId(), campaign); return campaign; } Campaigns(Tracker tracker); Campaign add(String campaignId); }
Campaigns { public Campaign add(String campaignId) { Campaign campaign = new Campaign(tracker) .setCampaignId(campaignId); tracker.getBusinessObjects().put(campaign.getId(), campaign); return campaign; } Campaigns(Tracker tracker); Campaign add(String campaignId);  }