@Test
public void binary() {

  assertTrue(new UriTokenizer("binary''").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("Binary'bm93'").next(TokenKind.BinaryValue));
  // all cases with three base64 characters (and one fill character) at the end
  assertTrue(new UriTokenizer("binary'QUA='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUE='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUI='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUM='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUQ='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUU='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUY='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUc='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUg='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUk='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUo='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUs='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QUw='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QU0='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QU4='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'QU8='").next(TokenKind.BinaryValue));
  assertFalse(new UriTokenizer("binary'QUB='").next(TokenKind.BinaryValue));
  // all cases with two base64 characters (and two fill characters) at the end
  assertTrue(new UriTokenizer("BINARY'VGVzdA=='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'U-RnZQ=='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'Yg=='").next(TokenKind.BinaryValue));
  assertTrue(new UriTokenizer("binary'Yw=='").next(TokenKind.BinaryValue));
  // without optional fill character
  assertTrue(new UriTokenizer("binary'T0RhdGE'").next(TokenKind.BinaryValue));
  // special character '_' (the other, '-', already has been used above)
  assertTrue(new UriTokenizer("binary'V_ZydGVy'").next(TokenKind.BinaryValue));
  wrongToken(TokenKind.BinaryValue, "binary'VGVzdA=='", '+');
}