@Test
public void testExec() throws IOException {

    final File tempFile = File.createTempFile("this is a test with whitespaces", ".txt");
    tempFile.deleteOnExit();
    try(FileWriter fw = new FileWriter(tempFile)) {
        fw.write(UUID.randomUUID().toString());
    }
    final OptionSet options = optionParser.parse("--vault", "dummy", "-m", tempFile.getAbsolutePath(), "--partsize", "1234");
    final InitiateMultipartUploadResult initiateResult = new InitiateMultipartUploadResult();
    initiateResult.setUploadId(UUID.randomUUID().toString());
    expect(client.initiateMultipartUpload(isA(InitiateMultipartUploadRequest.class))).andReturn(initiateResult).times(1);
    expect(client.uploadMultipartPart(isA(UploadMultipartPartRequest.class))).andReturn(new UploadMultipartPartResult()).times(1);
    expect(client.completeMultipartUpload(isA(CompleteMultipartUploadRequest.class))).andReturn(new CompleteMultipartUploadResult()).times(1);
    replay(client, sqs, sns);
    final UploadMultipartArchiveCommand command = new UploadMultipartArchiveCommand(client, sqs, sns);
    assertTrue(command.valid(options, optionParser));
    command.exec(options, optionParser);
    verify(client, sqs, sns);
}