@Test
public void testHasAtLeast() {

  assertEquals(1, Patterns.hasAtLeast(1).match("a", 0, 1));
  assertEquals(1, Patterns.hasAtLeast(1).match("abc", 0, 1));
  assertEquals(1, Patterns.hasAtLeast(1).match("abc", 1, 2));
  assertEquals(2, Patterns.hasAtLeast(2).match("abc", 0, 2));
  assertEquals(2, Patterns.hasAtLeast(2).match("abc", 0, 3));
  assertEquals(MISMATCH, Patterns.hasAtLeast(2).match("a", 0, 1));
}