@Test
public void exec() throws Exception {

    final String vaultName = "dummyVaultName";
    final String archiveId = UUID.randomUUID().toString();
    final Capture<DeleteArchiveRequest> capturedRequest = newCapture();
    expect(client.deleteArchive(capture(capturedRequest))).andReturn(new DeleteArchiveResult()).times(1);
    replay(client);
    final OptionSet options = optionParser.parse("--vault", vaultName, "--delete", archiveId);
    final DeleteArchiveCommand command = new DeleteArchiveCommand(client, sqs, sns);
    assertTrue(command.valid(options, optionParser));
    command.exec(options, optionParser);
    verify(client);
    assertEquals(vaultName, capturedRequest.getValue().getVaultName());
    assertEquals(archiveId, capturedRequest.getValue().getArchiveId());
}