@Test
public void exec() throws Exception {

    final String content = UUID.randomUUID().toString();
    final GetJobOutputResult jobResult = new GetJobOutputResult();
    jobResult.setBody(new StringInputStream(content));
    expect(client.getJobOutput(isA(GetJobOutputRequest.class))).andReturn(jobResult).times(1);
    replay(client);
    final OptionSet options = optionParser.parse("--vault", "vaultName", "--list-inventory", UUID.randomUUID().toString());
    final ReceiveArchivesListCommand command = new ReceiveArchivesListCommand(client, sqs, sns, new VaultInventoryPrinter() {
        @Override
        public void printInventory(final OutputStream out) throws JSONException {
            assertEquals(content, getInventory());
        }
    }, System.out);
    assertTrue(command.valid(options, optionParser));
    command.exec(options, optionParser);
    verify(client);
}