@Test
public void testTokens_simple() throws InvalidQueryException {

  List<Token> listTokens = new ArrayList<Token>();
  listTokens.add(new Token(Token.TYPE.RELATIONAL_OPERATOR, "="));
  listTokens.add(new Token(Token.TYPE.PROPERTY_OPERAND, "a"));
  listTokens.add(new Token(Token.TYPE.VALUE_OPERAND, "1"));
  listTokens.add(new Token(Token.TYPE.LOGICAL_OPERATOR, "&"));
  listTokens.add(new Token(Token.TYPE.BRACKET_OPEN, "("));
  listTokens.add(new Token(Token.TYPE.RELATIONAL_OPERATOR, "<="));
  listTokens.add(new Token(Token.TYPE.PROPERTY_OPERAND, "b"));
  listTokens.add(new Token(Token.TYPE.VALUE_OPERAND, "2"));
  listTokens.add(new Token(Token.TYPE.LOGICAL_OPERATOR, "|"));
  listTokens.add(new Token(Token.TYPE.RELATIONAL_OPERATOR, ">"));
  listTokens.add(new Token(Token.TYPE.PROPERTY_OPERAND, "c"));
  listTokens.add(new Token(Token.TYPE.VALUE_OPERAND, "3"));
  listTokens.add(new Token(Token.TYPE.BRACKET_CLOSE, ")"));
  QueryLexer lexer = new QueryLexer();
  Token[] tokens = lexer.tokens("a=1&(b<=2|c>3)");
  assertArrayEquals(listTokens.toArray(new Token[listTokens.size()]), tokens);
}