@Test public void unify() { assertEquals("jan nowak-jeziorański", PersonNameNormalizer.unify(" Jan Nowak– Jeziorański ")); }
public static String unify(String firstLastName) { firstLastName = StringTools.toRootLowerCase(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); firstLastName = replaceLongDashWithShort(firstLastName); return firstLastName; }
PersonNameNormalizer { public static String unify(String firstLastName) { firstLastName = StringTools.toRootLowerCase(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); firstLastName = replaceLongDashWithShort(firstLastName); return firstLastName; } }
PersonNameNormalizer { public static String unify(String firstLastName) { firstLastName = StringTools.toRootLowerCase(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); firstLastName = replaceLongDashWithShort(firstLastName); return firstLastName; } private  PersonNameNormalizer(); }
PersonNameNormalizer { public static String unify(String firstLastName) { firstLastName = StringTools.toRootLowerCase(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); firstLastName = replaceLongDashWithShort(firstLastName); return firstLastName; } private  PersonNameNormalizer(); static String normalize(String firstLastName); static String unify(String firstLastName); }
PersonNameNormalizer { public static String unify(String firstLastName) { firstLastName = StringTools.toRootLowerCase(firstLastName); firstLastName = StringTools.squashAndTrim(firstLastName); firstLastName = replaceLongDashWithShort(firstLastName); return firstLastName; } private  PersonNameNormalizer(); static String normalize(String firstLastName); static String unify(String firstLastName);  }