@Test
public void testVaultOverrideBySystemEnvironment() {

    final String vaultName = UUID.randomUUID().toString();
    final Map<String, String> props = new HashMap<>();
    props.put("vault", vaultName);
    // override option parser and check if it's taking the default values from provided configuration
    final GlacierUploaderOptionParser optionParser = new GlacierUploaderOptionParser(new MapConfiguration(props));
    final OptionSet options = optionParser.parse("--list-inventory");
    Capture<? extends InitiateJobRequest> capturedJobRequest = newCapture();
    expect(client.initiateJob(capture(capturedJobRequest)))
            .andReturn(new InitiateJobResult())
            .times(1);
    replay(client);
    final RequestArchivesListCommand command = new RequestArchivesListCommand(client, sqs, sns);
    command.exec(options, optionParser);
    verify(client);
    // make sure the vault name from our config is used
    assertEquals(capturedJobRequest.getValue().getVaultName(), vaultName);
}