@Test
public void testTokens_matchesRegexp_simple() throws InvalidQueryException {

  List<Token> listTokens = new ArrayList<Token>();
  listTokens.add(new Token(Token.TYPE.RELATIONAL_OPERATOR_FUNC, ".matches("));
  listTokens.add(new Token(Token.TYPE.PROPERTY_OPERAND, "StackConfigurations/property_type"));
  listTokens.add(new Token(Token.TYPE.VALUE_OPERAND, "(.*USER.*)|(.*GROUP.*)"));
  listTokens.add(new Token(Token.TYPE.BRACKET_CLOSE, ")"));
  QueryLexer lexer = new QueryLexer();
  Token[] tokens = lexer.tokens("StackConfigurations/property_type.matches((.*USER.*)|(.*GROUP.*))");
  assertArrayEquals(listTokens.toArray(new Token[listTokens.size()]), tokens);
}