@Test public void testGetPrefixWithoutSeparator() { assertThat(pluralNameParser.getPrefix("name_zero")).isEqualTo("name"); assertThat(pluralNameParser.getPrefix("name_one")).isEqualTo("name"); assertThat(pluralNameParser.getPrefix("name_two")).isEqualTo("name"); assertThat(pluralNameParser.getPrefix("name_few")).isEqualTo("name"); assertThat(pluralNameParser.getPrefix("name_many")).isEqualTo("name"); assertThat(pluralNameParser.getPrefix("name_other")).isEqualTo("name"); }
public String getPrefix(String nameWithPluralForm) { return nameWithPluralForm.replaceAll("_(zero|one|two|few|many|other)$", ""); }
PluralNameParser { public String getPrefix(String nameWithPluralForm) { return nameWithPluralForm.replaceAll("_(zero|one|two|few|many|other)$", ""); } }
PluralNameParser { public String getPrefix(String nameWithPluralForm) { return nameWithPluralForm.replaceAll("_(zero|one|two|few|many|other)$", ""); }  }
PluralNameParser { public String getPrefix(String nameWithPluralForm) { return nameWithPluralForm.replaceAll("_(zero|one|two|few|many|other)$", ""); }  String getPrefix(String nameWithPluralForm); String getPrefix(String name, String separator); String toPluralName(String prefix, String name, String separator); }
PluralNameParser { public String getPrefix(String nameWithPluralForm) { return nameWithPluralForm.replaceAll("_(zero|one|two|few|many|other)$", ""); }  String getPrefix(String nameWithPluralForm); String getPrefix(String name, String separator); String toPluralName(String prefix, String name, String separator);  }