@Test
public void testRepeat() {

  assertEquals(3, Patterns.repeat(3, CharPredicates.ALWAYS).match("abc", 0, 3));
  assertEquals(2, Patterns.repeat(2, CharPredicates.ALWAYS).match("abc", 0, 3));
  assertEquals(MISMATCH, Patterns.repeat(3, CharPredicates.NEVER).match("abc", 0, 3));
  assertEquals(MISMATCH, Patterns.repeat(3, CharPredicates.ALWAYS).match("abc", 0, 2));
}