@Test
public void testEndBy1() {

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