@Test public void testCreateKerberosConfig() { LdapConfig ldapConfig = new LdapConfig(); ldapConfig.setEnvironmentCrn(ENVIRONMENT_ID); Mockito.when(crnService.getCurrentAccountId()).thenReturn(ACCOUNT_ID); Mockito.when(crnService.createCrn(ACCOUNT_ID, Crn.ResourceType.LDAP)).thenReturn(RESOURCE_CRN); Mockito.when(ldapConfigRepository.save(ldapConfig)).thenReturn(ldapConfig); underTest.createLdapConfig(ldapConfig); assertNotNull(ldapConfig.getResourceCrn()); }
public LdapConfig createLdapConfig(LdapConfig ldapConfig) { String accountId = crnService.getCurrentAccountId(); return createLdapConfig(ldapConfig, accountId); }
LdapConfigService extends AbstractArchivistService<LdapConfig> { public LdapConfig createLdapConfig(LdapConfig ldapConfig) { String accountId = crnService.getCurrentAccountId(); return createLdapConfig(ldapConfig, accountId); } }
LdapConfigService extends AbstractArchivistService<LdapConfig> { public LdapConfig createLdapConfig(LdapConfig ldapConfig) { String accountId = crnService.getCurrentAccountId(); return createLdapConfig(ldapConfig, accountId); }  }
LdapConfigService extends AbstractArchivistService<LdapConfig> { public LdapConfig createLdapConfig(LdapConfig ldapConfig) { String accountId = crnService.getCurrentAccountId(); return createLdapConfig(ldapConfig, accountId); }  LdapConfig createLdapConfig(LdapConfig ldapConfig); LdapConfig createLdapConfig(LdapConfig ldapConfig, String accountId); LdapConfig get(String environmentCrn); List<LdapConfig> findAllByEnvironmentAndAccountIdEvenIfArchived(String environmentCrn, String accountId); Optional<LdapConfig> find(String environmentCrn, String accountId, String clusterName); void delete(String environmentCrn); void delete(String environmentCrn, String accountId); void delete(String environmentCrn, String accountId, String clusterName); void deleteAllInEnvironment(String environmentCrn, String accountId); String testConnection(String environmentCrn, LdapConfig ldapConfig); @Override JpaRepository repository(); }
LdapConfigService extends AbstractArchivistService<LdapConfig> { public LdapConfig createLdapConfig(LdapConfig ldapConfig) { String accountId = crnService.getCurrentAccountId(); return createLdapConfig(ldapConfig, accountId); }  LdapConfig createLdapConfig(LdapConfig ldapConfig); LdapConfig createLdapConfig(LdapConfig ldapConfig, String accountId); LdapConfig get(String environmentCrn); List<LdapConfig> findAllByEnvironmentAndAccountIdEvenIfArchived(String environmentCrn, String accountId); Optional<LdapConfig> find(String environmentCrn, String accountId, String clusterName); void delete(String environmentCrn); void delete(String environmentCrn, String accountId); void delete(String environmentCrn, String accountId, String clusterName); void deleteAllInEnvironment(String environmentCrn, String accountId); String testConnection(String environmentCrn, LdapConfig ldapConfig); @Override JpaRepository repository();  }