@Test public void isZoneAvailable() { assertFalse(service.isZoneAvailable("kaif-ok")); assertFalse(service.isZoneAvailable("kaif-null")); assertFalse(service.isZoneAvailable("null")); assertFalse(service.isZoneAvailable("s")); assertTrue(service.isZoneAvailable("aaa")); savedZoneDefault("aaa"); assertFalse(service.isZoneAvailable("aaa")); }
@Override public boolean isZoneAvailable(String zone) { return Zone.isValid(zone) && ZoneInfo.isValidDefault(zone) && !zoneDao.findZoneWithoutCache(Zone .valueOf(zone)).isPresent(); }
ZoneServiceImpl implements ZoneService { @Override public boolean isZoneAvailable(String zone) { return Zone.isValid(zone) && ZoneInfo.isValidDefault(zone) && !zoneDao.findZoneWithoutCache(Zone .valueOf(zone)).isPresent(); } }
ZoneServiceImpl implements ZoneService { @Override public boolean isZoneAvailable(String zone) { return Zone.isValid(zone) && ZoneInfo.isValidDefault(zone) && !zoneDao.findZoneWithoutCache(Zone .valueOf(zone)).isPresent(); }  }
ZoneServiceImpl implements ZoneService { @Override public boolean isZoneAvailable(String zone) { return Zone.isValid(zone) && ZoneInfo.isValidDefault(zone) && !zoneDao.findZoneWithoutCache(Zone .valueOf(zone)).isPresent(); }  @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 boolean isZoneAvailable(String zone) { return Zone.isValid(zone) && ZoneInfo.isValidDefault(zone) && !zoneDao.findZoneWithoutCache(Zone .valueOf(zone)).isPresent(); }  @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);  }