@Test
public void exec() throws Exception {

    ByteArrayOutputStream out = new ByteArrayOutputStream();
    // no need to specify options
    final OptionSet options = optionParser.parse("--help");
    final HelpCommand command = new HelpCommand(client, sqs, sns, out);
    assertTrue(command.valid(options, optionParser));
    command.exec(options, optionParser);
    ByteArrayOutputStream another = new ByteArrayOutputStream();
    optionParser.printHelpOn(another);
    assertEquals(another.toString(), out.toString());
}