MiscUtil { public static String toReadablePluralLabel(String value) { String label = toReadableLabel(value); return label.endsWith("ss") ? label.substring(0, label.length() - 1) : label; }  static String toVar(String name); static String toName(String name); static String toReadablePluralLabel(String value); static String toReadableLabel(String value); static boolean endsWithIgnoreCase(String name, Iterable<String> patterns); static boolean startsWithIgnoreCase(String name, Iterable<String> patterns); static boolean contains(String name, Iterable<String> patterns); static boolean equalsIgnoreCase(String name, Iterable<String> patterns); static boolean isUniCase(String value); static boolean isWithinAnUnderscorePatternButIsNotJavaBeanSpecificCase(String value, int position);  }
@Test public void readablePlural() { assertThat(toReadablePluralLabel("banque")).isEqualTo("Banque"); assertThat(toReadablePluralLabel("banquePays")).isEqualTo("Banque Pays"); assertThat(toReadablePluralLabel("banquePayss")).isEqualTo("Banque Pays"); assertThat(toReadablePluralLabel("BanquePayss")).isEqualTo("Banque Pays"); assertThat(toReadablePluralLabel("Banque-Payss")).isEqualTo("Banque Pays"); assertThat(toReadablePluralLabel("Banque__Payss")).isEqualTo("Banque Pays"); }