@Test public void testGetCommandStandardOutput() throws Exception{ PowerMockito.when(getCommandInvocationResult.getStandardOutputContent()).thenReturn("success execution"); String standardOutput = ssmRaiderUnderTest.getCommandStandardOutput("777" ,"i-1234"); Assert.assertEquals(standardOutput, "success execution"); }
@Override public String getCommandStandardOutput(String commandId, String instanceId) { return getCommandInvocationResult(commandId, instanceId).getStandardOutputContent(); }
SSMRaiderImpl implements SSMRaider { @Override public String getCommandStandardOutput(String commandId, String instanceId) { return getCommandInvocationResult(commandId, instanceId).getStandardOutputContent(); } }
SSMRaiderImpl implements SSMRaider { @Override public String getCommandStandardOutput(String commandId, String instanceId) { return getCommandInvocationResult(commandId, instanceId).getStandardOutputContent(); } SSMRaiderImpl(); }
SSMRaiderImpl implements SSMRaider { @Override public String getCommandStandardOutput(String commandId, String instanceId) { return getCommandInvocationResult(commandId, instanceId).getStandardOutputContent(); } SSMRaiderImpl(); @Override String executeShellCommands(List<String> instances, List<String> commands); @Override String getCommandStatus(String commandId, String instanceId); @Override String getCommandStandardOutput(String commandId, String instanceId); @Override String getCommandErrors(String commandId, String instanceId); @Override String executeShellCommandsFromFile(List<String> instances, String fileName, String... params); @Override String executeShellCommand(List<String> instances, Command command, String... params); }
SSMRaiderImpl implements SSMRaider { @Override public String getCommandStandardOutput(String commandId, String instanceId) { return getCommandInvocationResult(commandId, instanceId).getStandardOutputContent(); } SSMRaiderImpl(); @Override String executeShellCommands(List<String> instances, List<String> commands); @Override String getCommandStatus(String commandId, String instanceId); @Override String getCommandStandardOutput(String commandId, String instanceId); @Override String getCommandErrors(String commandId, String instanceId); @Override String executeShellCommandsFromFile(List<String> instances, String fileName, String... params); @Override String executeShellCommand(List<String> instances, Command command, String... params);  }