@Test
public void testFromFragment() {

  assertEquals("", Terminals.fromFragment().toString());
  assertEquals("1", Terminals.fromFragment(1).toString());
  TokenMap<String> fromToken = Terminals.fromFragment("foo", 1);
  assertEquals("[foo, 1]", fromToken.toString());
  assertEquals("test", fromToken.map(new Token(0, 3, Tokens.fragment("test", "foo"))));
  assertEquals("test", fromToken.map(new Token(0, 3, Tokens.fragment("test", 1))));
  assertNull(fromToken.map(new Token(0, 3, Tokens.fragment("test", "bar"))));
  assertNull(fromToken.map(new Token(0, 3, Tokens.fragment("test", 2))));
}