ReceiveArchivesListCommand extends AbstractCommand { @Override public boolean valid(OptionSet options, GlacierUploaderOptionParser optionParser) { log.debug("Checking options for {}: {},", getClass(), options.specs()); return !StringUtils.isBlank(options.valueOf(optionParser.vault)) && options.has(optionParser.inventoryListing) && options.hasArgument(optionParser.inventoryListing); } ReceiveArchivesListCommand(final AmazonGlacier client, final AmazonSQS sqs, final AmazonSNS sns);  ReceiveArchivesListCommand(final AmazonGlacier client, final AmazonSQS sqs, final AmazonSNS sns, final VaultInventoryPrinter vaultInventoryPrinter, final OutputStream out); @Override void exec(OptionSet options, GlacierUploaderOptionParser optionParser); @Override boolean valid(OptionSet options, GlacierUploaderOptionParser optionParser);  }
@Test public void execWithBlankVault() { final OptionSet options = optionParser.parse("--list-jobs", UUID.randomUUID().toString()); final ReceiveArchivesListCommand command = new ReceiveArchivesListCommand(client, sqs, sns); assertFalse(command.valid(options, optionParser)); }