@Test
public void testTokenType() {

  Token token = new Token(0, 1, 'a');
  Parser<Character> parser = Parsers.tokenType(Character.class, "character");
  assertEquals("character", parser.toString());
  assertEquals((Object) 'a', parser.from(Parsers.constant(token).times(1)).parse("", mode));
}