SSHAction extends Action { public SSHAction(SSHActionConfig config) { this.config = config; } SSHAction(SSHActionConfig config); @Override void configurePipeline(PipelineConfigurer pipelineConfigurer); @Override void run(final ActionContext context);  }
@Test public void testSSHAction() throws Exception { SSHAction.SSHActionConfig sshActionConfig = new SSHAction.SSHActionConfig(COMMAND, sshServer.getHost(), USER, PRIVATE_KEY, sshServer.getPort(), PASSPHRASE, OUTPUT_KEY); SSHAction sshAction = new SSHAction(sshActionConfig); MockActionContext mockActionContext = new MockActionContext(); sshAction.run(mockActionContext); Assert.assertEquals(mockActionContext.getArguments().get(OUTPUT_KEY), EXPECTED_OUTPUT); }