@Test
public void exec() {

    final String jobId = UUID.randomUUID().toString();
    final ListJobsResult jobResult = new ListJobsResult();
    final GlacierJobDescription jobDescription = new GlacierJobDescription();
    jobDescription.setJobId(jobId);
    jobDescription.setCompleted(true);
    jobResult.setJobList(Arrays.asList(jobDescription));
    expect(client.listJobs(isA(ListJobsRequest.class))).andReturn(jobResult).times(1);
    replay(client);
    final OptionSet options = optionParser.parse("--vault", "vaultName", "--list-jobs", UUID.randomUUID().toString());
    final ListJobsCommand command = new ListJobsCommand(client, sqs, sns, new JobPrinter() {
        @Override
        public void printJob(final GlacierJobDescription job, final OutputStream o) {
            assertEquals(jobId, job.getJobId());
        }
    });
    assertTrue(command.valid(options, optionParser));
    command.exec(options, optionParser);
    verify(client);
}