SSMRaiderImpl implements SSMRaider { @Override public String executeShellCommandsFromFile(List<String> instances, String fileName, String... params) { List<String> commands = CommandUtility.getCommandsFromFile(fileName, params); if (commands.isEmpty()) { throw new InvalidInputDataException("No commands available to execute"); } return this.executeShellCommands(instances, commands); } 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);  }
@Test public void testExecuteShellCommandsFromFile() throws Exception{ String commandId = ssmRaiderUnderTest.executeShellCommandsFromFile(createInstancesList(),"test.sh","java" ); Assert.assertEquals(commandId, "777"); }