@Test
public void testAsOptional() {

  assertEquals(Optional.of(12), INTEGER.asOptional().parse("12", mode));
  assertEquals(Optional.empty(), INTEGER.asOptional().parse("", mode));
  assertFailure(mode, areChars("ab").asOptional(), "a", 1, 2);
}