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