@Test
public void testRun() throws Exception {

  List<MultipleFieldsDocument> docs = asList(new MultipleFieldsDocument("123", "test 1", "test 2", "test 3"));
  commitDocuments(getDirectory(getIndexPath1AsFile()), docs.get(0));
  String queryField = "queryfield";
  String queryTerm = "queryterm";
  String maxHits = "500";
  String field1 = "field1";
  String field2 = "field2";
  String[] args = {
    "-i", getIndexPath1AsFile().toString(),
    "-o", seqFilesOutputPath.toString(),
    "-id", idField,
    "-f", field1 + "," + field2,
    "-q", queryField + ":" + queryTerm,
    "-n", maxHits,
    "-xm", "sequential"
  };
  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(asList(field1, field2), lucene2SeqConf.getFields());
  assertTrue(lucene2SeqConf.getQuery() instanceof TermQuery);
  assertEquals(queryField, ((TermQuery) lucene2SeqConf.getQuery()).getTerm().field());
  assertEquals(queryTerm, ((TermQuery) lucene2SeqConf.getQuery()).getTerm().text());
  assertEquals(new Integer(maxHits), (Integer) lucene2SeqConf.getMaxHits());
}