@Test public void testNotExistsTenantName() { boolean exists = tenantService.fnameExists(""); assertFalse(exists); exists = tenantService.fnameExists("Tenant1"); assertTrue(exists); }
public boolean fnameExists(final String fname) { boolean rslt = false; try { final ITenant tenant = getTenantByFName(fname); rslt = tenant != null; } catch (IllegalArgumentException iae) { rslt = false; } return rslt; }
TenantService { public boolean fnameExists(final String fname) { boolean rslt = false; try { final ITenant tenant = getTenantByFName(fname); rslt = tenant != null; } catch (IllegalArgumentException iae) { rslt = false; } return rslt; } }
TenantService { public boolean fnameExists(final String fname) { boolean rslt = false; try { final ITenant tenant = getTenantByFName(fname); rslt = tenant != null; } catch (IllegalArgumentException iae) { rslt = false; } return rslt; }  }
TenantService { public boolean fnameExists(final String fname) { boolean rslt = false; try { final ITenant tenant = getTenantByFName(fname); rslt = tenant != null; } catch (IllegalArgumentException iae) { rslt = false; } return rslt; }  @PostConstruct void init(); ITenant getTenantByFName(final String fname); List<ITenant> getTenantsList(); ITenant createTenant(
            final String name,
            final String fname,
            final Map<String, String> attributes,
            final Set<String> skipListenerFnames,
            final List<TenantOperationResponse> responses); ITenant updateTenant(
            final ITenant tenant,
            final Map<String, String> attributes,
            final List<TenantOperationResponse> responses); void deleteTenantByFName(String fname, List<TenantOperationResponse> responses); List<ITenantOperationsListener> getOptionalOperationsListeners(); Set<ITenantManagementAction> getAllAvaialableActions(); ITenantManagementAction getAction(final String fname); boolean nameExists(final String name); boolean fnameExists(final String fname); void validateName(final String name); void validateFname(final String fname); void validateAttribute(final String key, final String value); }
TenantService { public boolean fnameExists(final String fname) { boolean rslt = false; try { final ITenant tenant = getTenantByFName(fname); rslt = tenant != null; } catch (IllegalArgumentException iae) { rslt = false; } return rslt; }  @PostConstruct void init(); ITenant getTenantByFName(final String fname); List<ITenant> getTenantsList(); ITenant createTenant(
            final String name,
            final String fname,
            final Map<String, String> attributes,
            final Set<String> skipListenerFnames,
            final List<TenantOperationResponse> responses); ITenant updateTenant(
            final ITenant tenant,
            final Map<String, String> attributes,
            final List<TenantOperationResponse> responses); void deleteTenantByFName(String fname, List<TenantOperationResponse> responses); List<ITenantOperationsListener> getOptionalOperationsListeners(); Set<ITenantManagementAction> getAllAvaialableActions(); ITenantManagementAction getAction(final String fname); boolean nameExists(final String name); boolean fnameExists(final String fname); void validateName(final String name); void validateFname(final String fname); void validateAttribute(final String key, final String value);  }