@Test(expected = KeyPairException.class) public void testFailGenerateKeyPair() throws IOException { Application application = getApplication(false); doReturn(-1).when(process).exitValue(); keyPairService.exportCertificate(null, application); }
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);  }