### Question:
PhoneUtils { public static String toInternationalFormat(String number) throws NumberParseException { if (!isValidNumber(number)) { throw new NumberParseException(ErrorType.NOT_A_NUMBER, number + " is not a valid number"); } number = number.replaceAll("\\s+", ""); if (!number.contains("+")) { number = "+" + number; } PhoneNumber phoneNmber = PhoneNumberUtil.getInstance().parse(number, null); String nationalNumber = String.valueOf(phoneNmber.getNationalNumber()); String countryCode = String.valueOf(phoneNmber.getCountryCode()); String leadingZero = phoneNmber.hasItalianLeadingZero() ? "0" : ""; return countryCode + leadingZero + nationalNumber; }  static boolean isValidNumber(String number); static String toInternationalFormat(String number); static Optional<String> extractPhoneNumber(String message);  }### Answer:
@Parameters({ " +421 904 938 419 | 421904938419 ", " 421 904 938 419 | 421904938419 ", " +3906123456 | 3906123456 ", " +4407756738685 | 447756738685 ", " 4407756738685 | 447756738685 ", }) @Test public void testToInternationalFormat_shouldReturnFormattedNumber(String number, String expected) throws NumberParseException{ String actual = PhoneUtils.toInternationalFormat(number); assertThat(actual).isEqualTo(expected); }