AllCondition extends Condition { @Override public Query doQuery(Schema schema) { return new MatchAllDocsQuery(); } AllCondition(Float boost); @Override Query doQuery(Schema schema); Set<String> postProcessingFields(); @Override MoreObjects.ToStringHelper toStringHelper();  }
@Test public void testQuery() { AllCondition condition = new AllCondition(0.7f); Schema schema = schema().build(); Query query = condition.doQuery(schema); assertNotNull("Query is not built", query); assertEquals("Query type is wrong", MatchAllDocsQuery.class, query.getClass()); }