@Test
public void testEndBy() {

  Parser<List<Integer>> parser = INTEGER.endBy(isChar(';'));
  assertListParser(parser, "");
  assertListParser(parser, "1;", 1);
  assertListParser(parser, "12;3;", 12, 3);
  assertListParser(parser.followedBy(isChar(';')), ";");
  assertFailure(mode, parser, "1", 1, 2);
  assertFailure(mode, areChars("ab").endBy(isChar(';')), "ab;a", 1, 5);
}