### Question:
StringUtils { public String pluralize(String str) { if (str == null || str.length() == 0) { return str; } else if (str.endsWith("s") || str.endsWith("x")) { return str + "es"; } else if (str.endsWith("y")) { return str.substring(0, str.length() - 1) + "ies"; } else { return str + "s"; } }  static StringUtils getInstance(); String formatVariableName(String variableName); String stripPackageName(String fullyQualifiedClassName); String stripClass(String aString); String capitalized(String name); String uncapitalized(String aString); String capitalizedAsConstant(String name); String pluralize(String str); String stripGeneric(String str); String replaceWildcardInStringWithString(String wildcard, String pattern, String replacement);  }### Answer:
@Test public void testPluralize() throws Exception { assertEquals("Words", stringUtils.pluralize("Word")); assertEquals("Statuses", stringUtils.pluralize("Status")); assertEquals("Indexes", stringUtils.pluralize("Index")); assertEquals("Factories", stringUtils.pluralize("Factory")); assertEquals("", stringUtils.pluralize("")); assertEquals(null, stringUtils.pluralize(null)); }