### Question:
LocalizationUtility { public static String makePseudoFriendlyName(String fieldNameKey) { StringBuilder builder = new StringBuilder(fieldNameKey.length() + 10); char[] characters = fieldNameKey.toCharArray(); builder.append(Character.toUpperCase(characters[0])); boolean upcaseNextChar = false; for (int i = 1; i < characters.length; ++i) { if (characters[i] == '.') { builder.append(' '); upcaseNextChar = true; } else if (Character.isUpperCase(characters[i])) { builder.append(' ').append(characters[i]); upcaseNextChar = false; } else if (upcaseNextChar) { builder.append(Character.toUpperCase(characters[i])); upcaseNextChar = false; } else { builder.append(characters[i]); upcaseNextChar = false; } } return builder.toString(); }  static String getLocalizedFieldName(String fieldName,
            String actionPath,
            Class<? extends ActionBean> beanclass,
            Locale locale); static String makePseudoFriendlyName(String fieldNameKey); static String getErrorMessage(Locale locale, String key); static String getSimpleName(Class<?> c);  }### Answer:
@Test(groups = "fast") public void testBaseCase() throws Exception { String input = "Hello"; String output = LocalizationUtility.makePseudoFriendlyName(input); Assert.assertEquals(output, input); }
@Test(groups = "fast") public void testSimpleCase() throws Exception { String input = "hello"; String output = LocalizationUtility.makePseudoFriendlyName(input); Assert.assertEquals(output, "Hello"); }
@Test(groups = "fast") public void testWithPeriod() throws Exception { String input = "bug.name"; String output = LocalizationUtility.makePseudoFriendlyName(input); Assert.assertEquals(output, "Bug Name"); }
@Test(groups = "fast") public void testWithStudlyCaps() throws Exception { String input = "bugName"; String output = LocalizationUtility.makePseudoFriendlyName(input); Assert.assertEquals(output, "Bug Name"); }
@Test(groups = "fast") public void testComplexName() throws Exception { String input = "bug.submittedBy.firstName"; String output = LocalizationUtility.makePseudoFriendlyName(input); Assert.assertEquals(output, "Bug Submitted By First Name"); }