@Test
public void testRunOptionalArguments() throws Exception {

  commitDocuments(getDirectory(getIndexPath1AsFile()), new SingleFieldDocument("1", "Mahout is cool"));
  commitDocuments(getDirectory(getIndexPath1AsFile()), new SingleFieldDocument("2", "Mahout is cool"));
  String[] args = {
    "-i", getIndexPath1AsFile().toString(),
    "-o", seqFilesOutputPath.toString(),
    "-id", idField,
    "-f", StringUtils.join(fields, SequenceFilesFromLuceneStorageDriver.SEPARATOR_FIELDS)
  };
  driver.setConf(conf);
  driver.run(args);
  assertEquals(1, lucene2SeqConf.getIndexPaths().size());
  assertEquals(getIndexPath1().toUri().getPath(), lucene2SeqConf.getIndexPaths().get(0).toUri().getPath());
  assertEquals(seqFilesOutputPath, lucene2SeqConf.getSequenceFilesOutputPath());
  assertEquals(idField, lucene2SeqConf.getIdField());
  assertEquals(fields, lucene2SeqConf.getFields());
  assertEquals(conf, lucene2SeqConf.getConfiguration());
  assertEquals(SequenceFilesFromLuceneStorageDriver.DEFAULT_QUERY, lucene2SeqConf.getQuery());
  assertEquals(SequenceFilesFromLuceneStorageDriver.DEFAULT_MAX_HITS, lucene2SeqConf.getMaxHits());
}