@Test public void helpOptionOutputsUsageMessage() { commandLine.execute("help"); final CliResult result = commandLine.getExecutionResult(); final String output = systemOutOutput.getLog(); assertThat(result).isNull(); assertThat(output) .contains( "Usage:", "Run a standalone enclave to perform encryption/decryption operations", "<main class> [help] -configfile <config> [-pidfile <pidFilePath>]"); assertThat(output) .contains( "Description:", "Run a standalone enclave, which will perform encryption/decryption operations", "for a transaction manager. This means that the transaction manager does not", "perform any of the operations inside its own process, shielding the user from"); assertThat(output) .contains( "Options:", " -configfile <config> path to configuration file", " help display this help message", " -pidfile <pidFilePath> the path to write the PID to"); }
@Override public CliResult execute(String... args) throws Exception { this.pidFileMixin.call(); final Config config = configurationMixin.getConfig(); keyPasswordResolver.resolveKeyPasswords(config); return new CliResult(0, false, config); }
EnclaveCliAdapter implements CliAdapter, Callable<CliResult> { @Override public CliResult execute(String... args) throws Exception { this.pidFileMixin.call(); final Config config = configurationMixin.getConfig(); keyPasswordResolver.resolveKeyPasswords(config); return new CliResult(0, false, config); } }
EnclaveCliAdapter implements CliAdapter, Callable<CliResult> { @Override public CliResult execute(String... args) throws Exception { this.pidFileMixin.call(); final Config config = configurationMixin.getConfig(); keyPasswordResolver.resolveKeyPasswords(config); return new CliResult(0, false, config); } EnclaveCliAdapter(final KeyPasswordResolver keyPasswordResolver);  EnclaveCliAdapter(); }
EnclaveCliAdapter implements CliAdapter, Callable<CliResult> { @Override public CliResult execute(String... args) throws Exception { this.pidFileMixin.call(); final Config config = configurationMixin.getConfig(); keyPasswordResolver.resolveKeyPasswords(config); return new CliResult(0, false, config); } EnclaveCliAdapter(final KeyPasswordResolver keyPasswordResolver);  EnclaveCliAdapter(); @Override CliType getType(); @Override CliResult call(); @Override CliResult execute(String... args); }
EnclaveCliAdapter implements CliAdapter, Callable<CliResult> { @Override public CliResult execute(String... args) throws Exception { this.pidFileMixin.call(); final Config config = configurationMixin.getConfig(); keyPasswordResolver.resolveKeyPasswords(config); return new CliResult(0, false, config); } EnclaveCliAdapter(final KeyPasswordResolver keyPasswordResolver);  EnclaveCliAdapter(); @Override CliType getType(); @Override CliResult call(); @Override CliResult execute(String... args);  }