### Question:
PhoneUtils { public static boolean isValidNumber(String number) { if (number == null) { return false; } number = number.trim().replaceAll("\\s+", ""); if (!PHONE_PATTERN.matcher(number).matches()) { return false; } return true; }  static boolean isValidNumber(String number); static String toInternationalFormat(String number); static Optional<String> extractPhoneNumber(String message);  }### Answer:
@Parameters({ "123", "+123", " +123 ", " 123 ", " +421 904 938 419 ", "2787240508621337", "27872 405 086 21337", "+ 2787240508621337", " + 2787240508621337", }) @Test public void testIsValidNumber_shouldBeValidNumber(String number){ boolean isValid = PhoneUtils.isValidNumber(number); assertThat(isValid).isTrue(); }
@Parameters({ "", "null", "a", "12 ", " aa 123 ", " asdf " }) @Test public void testIsValidNumber_shouldBeINVALIDNumber(@Nullable String number){ boolean isValid = PhoneUtils.isValidNumber(number); assertThat(isValid).isFalse(); }