LuceneService { public void removeDocuments(List<Query> queries) { IndexWriter writer = getWriter(); for (Query query : queries) { try { writer.deleteDocuments(query); } catch (Exception e) { e.printStackTrace(); closeWriter(writer); throw new RuntimeException(e); } } closeWriter(writer); } LuceneService();   LuceneService(Directory directory); void indexDocument(Document doc); void indexDocuments(List<Document> docs); void removeDocument(Query query); void removeDocuments(List<Query> queries); List<Document> search(Query query, boolean prefixWildCard); void clearIndex();  }
@Test public void testRemoveDocuments_1() throws Exception { LuceneService fixture = new LuceneService(); List<Query> queries = new LinkedList<>(); fixture.removeDocuments(queries); }
@Test public void testRemoveDocuments_2() throws Exception { LuceneService fixture = new LuceneService(); List<Query> queries = new LinkedList<>(); fixture.removeDocuments(queries); }