@Test
public void testIfElse() {

  assertEquals(3,
      Patterns.isChar('a').ifelse(Patterns.string("bc"), Patterns.INTEGER)
          .match("abcd", 0, 4));
  assertEquals(MISMATCH,
      Patterns.isChar('a').ifelse(Patterns.string("bd"), Patterns.INTEGER)
          .match("abcd", 0, 4));
  assertEquals(2,
      Patterns.isChar('a').ifelse(Patterns.string("bc"), Patterns.INTEGER)
          .match("12c", 0, 3));
  assertEquals(MISMATCH,
      Patterns.isChar('a').ifelse(Patterns.string("bc"), Patterns.INTEGER)
          .match("xxx", 0, 3));
}