@Test
public void exec() throws Exception {

    final String vaultName = "dummyVaultName";
    final ListVaultsResult vaultList = new ListVaultsResult();
    final DescribeVaultOutput describeVaultOutput = new DescribeVaultOutput();
    describeVaultOutput.setVaultName(vaultName);
    vaultList.setVaultList(Arrays.asList(describeVaultOutput));
    expect(client.listVaults(isA(ListVaultsRequest.class))).andReturn(vaultList).times(1);
    replay(client);
    final OptionSet options = optionParser.parse("--list-vaults");
    final ListVaultCommand command = new ListVaultCommand(client, sqs, sns, new VaultPrinter() {
        @Override
        public void printVault(final DescribeVaultOutput output, final OutputStream o) {
            assertEquals(vaultName, output.getVaultName());
        }
    }, System.out);
    assertTrue(command.valid(options, optionParser));
    command.exec(options, optionParser);
    verify(client);
}