@Test
public void operators() {

  UriTokenizer tokenizer = new UriTokenizer("1 ne 2");
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertFalse(tokenizer.next(TokenKind.EqualsOperator));
  assertTrue(tokenizer.next(TokenKind.NotEqualsOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.EOF));
  tokenizer = new UriTokenizer("-1ne 2");
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertFalse(tokenizer.next(TokenKind.NotEqualsOperator));
  tokenizer = new UriTokenizer("1 ne-2");
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertFalse(tokenizer.next(TokenKind.NotEqualsOperator));
  tokenizer = new UriTokenizer("1    \tle\t\t\t2");
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.LessThanOrEqualsOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.EOF));
  assertTrue(new UriTokenizer("-x").next(TokenKind.MinusOperator));
  assertFalse(new UriTokenizer("-1").next(TokenKind.MinusOperator));
  assertFalse(new UriTokenizer("-INF").next(TokenKind.MinusOperator));
  assertFalse(new UriTokenizer("+").next(TokenKind.MinusOperator));
  assertFalse(new UriTokenizer("nottrue").next(TokenKind.NotOperator));
  assertFalse(new UriTokenizer("no true").next(TokenKind.NotOperator));
  tokenizer = new UriTokenizer("true or not false and 1 eq 2 add 3 sub 4 mul 5 div 6 mod 7");
  assertTrue(tokenizer.next(TokenKind.BooleanValue));
  assertTrue(tokenizer.next(TokenKind.OrOperator));
  assertTrue(tokenizer.next(TokenKind.NotOperator));
  assertTrue(tokenizer.next(TokenKind.BooleanValue));
  assertTrue(tokenizer.next(TokenKind.AndOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.EqualsOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.AddOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.SubOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.MulOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.DivOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.ModOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.EOF));
  tokenizer = new UriTokenizer("1 gt 2 or 3 ge 4 or 5 lt 6 or 7 has namespace.name'flag1,flag2'");
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.GreaterThanOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.OrOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.GreaterThanOrEqualsOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.OrOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.LessThanOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.OrOperator));
  assertTrue(tokenizer.next(TokenKind.IntegerValue));
  assertTrue(tokenizer.next(TokenKind.HasOperator));
  assertTrue(tokenizer.next(TokenKind.EnumValue));
  assertTrue(tokenizer.next(TokenKind.EOF));
}