QuerySetResults { public QueryResults get(String query) { return querySetResults.get(query); } QuerySetResults(Map<String, List<EvalDoc>> results);  QuerySetResults(String filename); Map<String, QueryResults> toMap(); Iterable<String> getQueryIterator(); QueryResults get(String query); String getName(); void ensureQuerySet(List<Parameters> queries); void dropQuery(String qid); void restrictQueries(List<String> qids);  }
@Test public void testGet() { ArrayList<EvalDoc> newDocs = new ArrayList<>(); for (EvalDoc d : docs1) { newDocs.add(new SimpleEvalDoc(d.getName(), d.getRank(), d.getScore())); } Collections.shuffle(newDocs); Map<String, List<EvalDoc>> results = new HashMap<>(); results.put("query docs1", newDocs); QuerySetResults rs = new QuerySetResults(results); QueryResults newResults = rs.get("query docs1"); int i = 0; for (EvalDoc sd : newResults.getIterator()) { Assert.assertTrue(sd.equals(docs1.get(i++))); } }