@Test public void listAdministerZones() { assertTrue(service.listAdministerZones(citizen.getUsername()).isEmpty()); accountDao.changeTotalVotedDebate(citizen.getAccountId(), 30, 0); ZoneInfo bZone = service.createByUser("bbb1", "this is aaa1", citizen); ZoneInfo aZone = service.createByUser("aaa2", "this is aaa2", citizen); List<ZoneInfo> administerZones = service.listAdministerZones(citizen.getUsername()); assertEquals(2, administerZones.size()); assertEquals(aZone, administerZones.get(0)); assertEquals(bZone, administerZones.get(1)); }
@Override public List<ZoneInfo> listAdministerZones(String username) { Account account = accountDao.loadByUsername(username); return zoneDao.listZonesByAdmin(account.getAccountId()); }
ZoneServiceImpl implements ZoneService { @Override public List<ZoneInfo> listAdministerZones(String username) { Account account = accountDao.loadByUsername(username); return zoneDao.listZonesByAdmin(account.getAccountId()); } }
ZoneServiceImpl implements ZoneService { @Override public List<ZoneInfo> listAdministerZones(String username) { Account account = accountDao.loadByUsername(username); return zoneDao.listZonesByAdmin(account.getAccountId()); }  }
ZoneServiceImpl implements ZoneService { @Override public List<ZoneInfo> listAdministerZones(String username) { Account account = accountDao.loadByUsername(username); return zoneDao.listZonesByAdmin(account.getAccountId()); }  @Override ZoneInfo loadZone(Zone zone); @Override ZoneInfo createDefault(String zone, String aliasName); @Override ZoneInfo createKaif(String zone, String aliasName); @Override void updateTheme(Zone zone, String theme); @Override Map<String, List<ZoneInfo>> listZoneAtoZ(); @Override List<ZoneInfo> listRecommendZones(); @Override List<ZoneInfo> listCitizenZones(); @Override ZoneInfo createByUser(String zone, String aliasName, Authorization creator); @Override List<ZoneInfo> listAdministerZones(String username); @Override boolean isZoneAvailable(String zone); @Override boolean canCreateZone(Authorization authorization); @Override List<String> listAdministratorsWithCache(Zone zone); }
ZoneServiceImpl implements ZoneService { @Override public List<ZoneInfo> listAdministerZones(String username) { Account account = accountDao.loadByUsername(username); return zoneDao.listZonesByAdmin(account.getAccountId()); }  @Override ZoneInfo loadZone(Zone zone); @Override ZoneInfo createDefault(String zone, String aliasName); @Override ZoneInfo createKaif(String zone, String aliasName); @Override void updateTheme(Zone zone, String theme); @Override Map<String, List<ZoneInfo>> listZoneAtoZ(); @Override List<ZoneInfo> listRecommendZones(); @Override List<ZoneInfo> listCitizenZones(); @Override ZoneInfo createByUser(String zone, String aliasName, Authorization creator); @Override List<ZoneInfo> listAdministerZones(String username); @Override boolean isZoneAvailable(String zone); @Override boolean canCreateZone(Authorization authorization); @Override List<String> listAdministratorsWithCache(Zone zone);  }