@Test public void normalize_VonShouldNotBeCapitalized() { assertEquals("Alfred von Ribbentrop", PersonNameNormalizer.normalize("Alfred Von Ribbentrop")); }
public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); }
PersonNameNormalizer { public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); } }
PersonNameNormalizer { public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); } private  PersonNameNormalizer(); }
PersonNameNormalizer { public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); } private  PersonNameNormalizer(); static String normalize(String firstLastName); static String unify(String firstLastName); }
PersonNameNormalizer { public static String normalize(String firstLastName) { Preconditions.checkNotNull(firstLastName); firstLastName = unify(firstLastName); firstLastName = removeNonAlphabetic(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); return capitalizeFirstLetters(firstLastName); } private  PersonNameNormalizer(); static String normalize(String firstLastName); static String unify(String firstLastName);  }