@Test
public void testParse_FilterOp_exception() throws Exception {

  List<Token> listTokens = new ArrayList<Token>();
  listTokens.add(new Token(Token.TYPE.RELATIONAL_OPERATOR_FUNC, ".matches("));
  listTokens.add(new Token(Token.TYPE.PROPERTY_OPERAND, "foo"));
  listTokens.add(new Token(Token.TYPE.BRACKET_CLOSE, ")"));
  QueryParser parser = new QueryParser();
  try {
    Predicate p = parser.parse(listTokens.toArray(new Token[listTokens.size()]));
    fail("Filter operator is missing a required right operand.");
  } catch (InvalidQueryException e) {
    // expected
  }
}