assertEquals("f", ((TermQuery) i.next()).getTerm()); assertEquals("c", ((TermQuery) i.next()).getTerm());
assertEquals("f", ((TermQuery) i.next()).getTerm());
    public void testGetTerms() throws Exception {        IngridQuery query = QueryStringParser.parse("(a AND b) OR (c OR d OR f AND (a:1) OR c AND (a AND a:2))");        Vector v = tools.getTermsAsVector(query, false, false);        Iterator i = v.iterator();        assertEquals("d", ((TermQuery) i.next()).getTerm());        assertEquals("f", ((TermQuery) i.next()).getTerm());        assertEquals("c", ((TermQuery) i.next()).getTerm());                       v = tools.getTermsAsVector(query, false, true);        i = v.iterator();        assertEquals("a", ((TermQuery) i.next()).getTerm());        assertEquals("b", ((TermQuery) i.next()).getTerm());        assertEquals("a", ((TermQuery) i.next()).getTerm());    }