@Test void test_Main_KeyPassIsMissing() throws URISyntaxException { final Path path = Paths.get(toUri("testdata/cli/missing-keypass.conf")); try { Runner.main("-c", path.toString()); fail("expected exception: property is missing"); } catch (RunnerException e) { assertEquals("Missing value for config property: keyPass", e.getCause().getMessage()); } }
public static void main(final String ...args) throws RunnerException { try { val configFilePath = Config.getCliConfigOption(args); val properties = Config.parseConfigFileProperties(Paths.get(configFilePath)); val options = Config.createKeyStoreOptions(properties); try (val keyStoreHelper = KeyStoreHelper.create(options)) { keyStoreHelper.run(true); } } catch (SocketEndpointAddressException | KeyStoreHelperException | RunnerException | InvalidParameterException | KeyStoreException e) { log.severe(e.getMessage()); throw new RunnerException(e); } }
Runner { public static void main(final String ...args) throws RunnerException { try { val configFilePath = Config.getCliConfigOption(args); val properties = Config.parseConfigFileProperties(Paths.get(configFilePath)); val options = Config.createKeyStoreOptions(properties); try (val keyStoreHelper = KeyStoreHelper.create(options)) { keyStoreHelper.run(true); } } catch (SocketEndpointAddressException | KeyStoreHelperException | RunnerException | InvalidParameterException | KeyStoreException e) { log.severe(e.getMessage()); throw new RunnerException(e); } } }
Runner { public static void main(final String ...args) throws RunnerException { try { val configFilePath = Config.getCliConfigOption(args); val properties = Config.parseConfigFileProperties(Paths.get(configFilePath)); val options = Config.createKeyStoreOptions(properties); try (val keyStoreHelper = KeyStoreHelper.create(options)) { keyStoreHelper.run(true); } } catch (SocketEndpointAddressException | KeyStoreHelperException | RunnerException | InvalidParameterException | KeyStoreException e) { log.severe(e.getMessage()); throw new RunnerException(e); } } private  Runner(); }
Runner { public static void main(final String ...args) throws RunnerException { try { val configFilePath = Config.getCliConfigOption(args); val properties = Config.parseConfigFileProperties(Paths.get(configFilePath)); val options = Config.createKeyStoreOptions(properties); try (val keyStoreHelper = KeyStoreHelper.create(options)) { keyStoreHelper.run(true); } } catch (SocketEndpointAddressException | KeyStoreHelperException | RunnerException | InvalidParameterException | KeyStoreException e) { log.severe(e.getMessage()); throw new RunnerException(e); } } private  Runner(); static void main(final String ...args); }
Runner { public static void main(final String ...args) throws RunnerException { try { val configFilePath = Config.getCliConfigOption(args); val properties = Config.parseConfigFileProperties(Paths.get(configFilePath)); val options = Config.createKeyStoreOptions(properties); try (val keyStoreHelper = KeyStoreHelper.create(options)) { keyStoreHelper.run(true); } } catch (SocketEndpointAddressException | KeyStoreHelperException | RunnerException | InvalidParameterException | KeyStoreException e) { log.severe(e.getMessage()); throw new RunnerException(e); } } private  Runner(); static void main(final String ...args);  }