PhoneNumberValidator { public static boolean valid(String num) { return PHONENUM_PATTERN.matcher(num).matches(); }  static boolean valid(String num); static final String PATTERN_STRING; static final Pattern PHONENUM_PATTERN; }
@Test public void goodTests() { for (String test : goodTests) { assertTrue(test, PhoneNumberValidator.valid(test)); } }
@Test public void badTests() { for (String test : badTests) { assertFalse(test, PhoneNumberValidator.valid(test)); } }