@Test
public void testNestedScanner() {

  Parser<Void> scanner = Scanners.nestedScanner(
      Scanners.isChar(CharPredicates.IS_ALPHA).skipMany1(), Scanners.isChar('a').skipTimes(2));
  assertEquals("nested scanner", scanner.toString());
  assertNull(scanner.parse("aa"));
  assertNull(scanner.parse("aabb"));
  assertFailure(mode, scanner, "ab", 1, 2);
  assertFailure(mode, scanner, "01", 1, 1);
  assertNull(Scanners.isChar(' ').next(scanner).parse(" aa"));
  assertNull(Scanners.isChar(' ').next(scanner).parse(" aab"));
  assertScanner(mode, Scanners.isChar(' ').next(scanner), " aab1", "1");
  assertScanner(mode, Scanners.isChar(' ').next(scanner), " aa1", "1");
}