@Test public void testCreateKerberosConfig() { KerberosConfig kerberosConfig = new KerberosConfig(); kerberosConfig.setEnvironmentCrn(ENVIRONMENT_ID); Mockito.when(crnService.getCurrentAccountId()).thenReturn(ACCOUNT_ID); Mockito.when(crnService.createCrn(ACCOUNT_ID, Crn.ResourceType.KERBEROS)).thenReturn(RESOURCE_CRN); Mockito.when(kerberosConfigRepository.save(kerberosConfig)).thenReturn(kerberosConfig); underTest.createKerberosConfig(kerberosConfig); Assertions.assertNotNull(kerberosConfig.getResourceCrn()); }
public KerberosConfig createKerberosConfig(KerberosConfig kerberosConfig) { String accountId = crnService.getCurrentAccountId(); return createKerberosConfig(kerberosConfig, accountId); }
KerberosConfigService extends AbstractArchivistService<KerberosConfig> { public KerberosConfig createKerberosConfig(KerberosConfig kerberosConfig) { String accountId = crnService.getCurrentAccountId(); return createKerberosConfig(kerberosConfig, accountId); } }
KerberosConfigService extends AbstractArchivistService<KerberosConfig> { public KerberosConfig createKerberosConfig(KerberosConfig kerberosConfig) { String accountId = crnService.getCurrentAccountId(); return createKerberosConfig(kerberosConfig, accountId); }  }
KerberosConfigService extends AbstractArchivistService<KerberosConfig> { public KerberosConfig createKerberosConfig(KerberosConfig kerberosConfig) { String accountId = crnService.getCurrentAccountId(); return createKerberosConfig(kerberosConfig, accountId); }  KerberosConfig createKerberosConfig(KerberosConfig kerberosConfig); KerberosConfig createKerberosConfig(KerberosConfig kerberosConfig, String accountId); KerberosConfig get(String environmentCrn); Optional<KerberosConfig> find(String environmentCrn, String accountId, String clusterName); List<KerberosConfig> findAllInEnvironmentEvenIfArchived(String environmentCrn, String accountId); void delete(String environmentCrn); void delete(String environmentCrn, String accountId); void delete(String environmentCrn, String accountId, String clusterName); void deleteAllInEnvironment(String environmentCrn, String accountId); @Override JpaRepository repository(); }
KerberosConfigService extends AbstractArchivistService<KerberosConfig> { public KerberosConfig createKerberosConfig(KerberosConfig kerberosConfig) { String accountId = crnService.getCurrentAccountId(); return createKerberosConfig(kerberosConfig, accountId); }  KerberosConfig createKerberosConfig(KerberosConfig kerberosConfig); KerberosConfig createKerberosConfig(KerberosConfig kerberosConfig, String accountId); KerberosConfig get(String environmentCrn); Optional<KerberosConfig> find(String environmentCrn, String accountId, String clusterName); List<KerberosConfig> findAllInEnvironmentEvenIfArchived(String environmentCrn, String accountId); void delete(String environmentCrn); void delete(String environmentCrn, String accountId); void delete(String environmentCrn, String accountId, String clusterName); void deleteAllInEnvironment(String environmentCrn, String accountId); @Override JpaRepository repository();  }