@Test
public void testPattern() {

  Parser<Void> scanner = Patterns.INTEGER.toScanner("integer");
  assertNull(scanner.parse("123"));
  assertScanner(mode, scanner, "12a", "a");
  assertFailure(mode, scanner, "", 1, 1, "integer expected, EOF encountered.");
  assertFailure(mode, scanner, "a", 1, 1);
}