@Test
public void testIsChar_withPredicate() {

  assertEquals(1, Patterns.isChar(CharPredicates.ALWAYS).match("x", 0, 1));
  assertEquals(1, Patterns.isChar(CharPredicates.ALWAYS).match(" x", 1, 2));
  assertEquals(MISMATCH, Patterns.isChar(CharPredicates.NEVER).match("a", 0, 1));
  assertEquals(MISMATCH, Patterns.isChar(CharPredicates.ALWAYS).match("X", 0, 0));
  assertEquals(MISMATCH, Patterns.isChar(CharPredicates.NEVER).match("X", 0, 0));
}