### Question:
RegexValidator implements Validator<String> { @Override public boolean isValid(String input) { return isNotBlank(input) && pattern.matcher(input).matches(); } RegexValidator(String regex); @Override boolean isValid(String input);  }### Answer:
@Test public void testNegative() { Assert.assertFalse(victim.isValid("dsdsa")); }
@Test public void testPositive() { Assert.assertTrue(victim.isValid("2")); Assert.assertTrue(victim.isValid("2,3,4")); }
@Test public void testAllowBlank() { Assert.assertFalse(victim.isValid("")); Assert.assertTrue(Validators.validEmpty(victim).isValid("")); }