@Test public void testShouldNotGenerateCertificate() throws InterruptedException { doReturn(Collections.EMPTY_LIST).when(arguments).getOptionValues(GENERATE_CERTIFICATE); keyPairService.exportCertificate(null, null); verify(process, times(0)).waitFor(); }
public void exportCertificate(IntegrationSettings settings, Application application) { if (shouldGenerateCertificate()) { String keyFileName = generatePrivateKey(application); String reqFileName = generateCSR(settings.getUsername(), application, keyFileName); generateCertificate(application, keyFileName, reqFileName); } }
UserKeyPairService extends KeyPairService { public void exportCertificate(IntegrationSettings settings, Application application) { if (shouldGenerateCertificate()) { String keyFileName = generatePrivateKey(application); String reqFileName = generateCSR(settings.getUsername(), application, keyFileName); generateCertificate(application, keyFileName, reqFileName); } } }
UserKeyPairService extends KeyPairService { public void exportCertificate(IntegrationSettings settings, Application application) { if (shouldGenerateCertificate()) { String keyFileName = generatePrivateKey(application); String reqFileName = generateCSR(settings.getUsername(), application, keyFileName); generateCertificate(application, keyFileName, reqFileName); } } UserKeyPairService(ApplicationArguments args, LogMessageSource logMessage,
      IntegrationProperties properties, IntegrationUtils utils); }
UserKeyPairService extends KeyPairService { public void exportCertificate(IntegrationSettings settings, Application application) { if (shouldGenerateCertificate()) { String keyFileName = generatePrivateKey(application); String reqFileName = generateCSR(settings.getUsername(), application, keyFileName); generateCertificate(application, keyFileName, reqFileName); } } UserKeyPairService(ApplicationArguments args, LogMessageSource logMessage,
      IntegrationProperties properties, IntegrationUtils utils); void exportCertificate(IntegrationSettings settings, Application application); }
UserKeyPairService extends KeyPairService { public void exportCertificate(IntegrationSettings settings, Application application) { if (shouldGenerateCertificate()) { String keyFileName = generatePrivateKey(application); String reqFileName = generateCSR(settings.getUsername(), application, keyFileName); generateCertificate(application, keyFileName, reqFileName); } } UserKeyPairService(ApplicationArguments args, LogMessageSource logMessage,
      IntegrationProperties properties, IntegrationUtils utils); void exportCertificate(IntegrationSettings settings, Application application);  }