@Test public void countForClientId() { assertThat(service.getCountForClientId(clientId1).getApprovedSiteCount(), is(2)); assertThat(service.getCountForClientId(clientId2).getApprovedSiteCount(), is(1)); assertThat(service.getCountForClientId(clientId3).getApprovedSiteCount(), is(1)); assertThat(service.getCountForClientId(clientId4).getApprovedSiteCount(), is(0)); }
@Override public ClientStat getCountForClientId(String clientId) { Collection<ApprovedSite> approvedSites = approvedSiteService.getByClientId(clientId); ClientStat stat = new ClientStat(); stat.setApprovedSiteCount(approvedSites.size()); return stat; }
DefaultStatsService implements StatsService { @Override public ClientStat getCountForClientId(String clientId) { Collection<ApprovedSite> approvedSites = approvedSiteService.getByClientId(clientId); ClientStat stat = new ClientStat(); stat.setApprovedSiteCount(approvedSites.size()); return stat; } }
DefaultStatsService implements StatsService { @Override public ClientStat getCountForClientId(String clientId) { Collection<ApprovedSite> approvedSites = approvedSiteService.getByClientId(clientId); ClientStat stat = new ClientStat(); stat.setApprovedSiteCount(approvedSites.size()); return stat; }  }
DefaultStatsService implements StatsService { @Override public ClientStat getCountForClientId(String clientId) { Collection<ApprovedSite> approvedSites = approvedSiteService.getByClientId(clientId); ClientStat stat = new ClientStat(); stat.setApprovedSiteCount(approvedSites.size()); return stat; }  @Override Map<String, Integer> getSummaryStats(); @Override ClientStat getCountForClientId(String clientId); @Override void resetCache(); }
DefaultStatsService implements StatsService { @Override public ClientStat getCountForClientId(String clientId) { Collection<ApprovedSite> approvedSites = approvedSiteService.getByClientId(clientId); ClientStat stat = new ClientStat(); stat.setApprovedSiteCount(approvedSites.size()); return stat; }  @Override Map<String, Integer> getSummaryStats(); @Override ClientStat getCountForClientId(String clientId); @Override void resetCache();  }