### Question:
GlobalUtils { public static String createClassName(final String input) { if (Strings.isNullOrEmpty(input) || input.trim().equals(":")) { return EssentialConst.INVALID_CLASS_NAME; } final String name = PATTERN_SPACES.matcher(input).replaceAll(""); final int index = name.indexOf(':'); if (index == -1 || index == name.length() - 1) { return capitalize(name.replace(':', ' ').trim()); } final String[] parts = NAMESPACE_PATTERN.split(name); if (parts.length < 1) { return EssentialConst.INVALID_CLASS_NAME; } return capitalize(parts[1]); } private  GlobalUtils(); static String replacePlaceholders(final String input, final String placeholder, final String replacement); static String readStreamAsText(final InputStream stream); static void populateDirectories(final Path startPath, final List<Path> existing); static StringBuilder readTextFile(final Path path); static void writeToFile(final CharSequence content, final Path path); static String createMethodName(final String name); static String createClassName(final String input); static String getNamespacePrefix(final String fullName); static String getNameAfterPrefix(final String fullName); @SuppressWarnings("HippoHstCallNodeRefreshInspection") static void refreshSession(final Session session, final boolean keepChanges); static Session createSession(); static void cleanupSession(final Session session); static T newInstance(final Class<T> clazz); @SuppressWarnings("unchecked") static T newInstance(final String className); static Class<?> loadCLass(final String clazz); static String decodeUrl(final String url); static String validFileName(final String input); static boolean marshalWriter(final Writer writer, final Document document); @SuppressWarnings("unchecked") static T unmarshalStream(final InputStream stream, final Class<T> clazz);  }### Answer:
@Test public void testGenerateClassName() throws Exception { String name = GlobalUtils.createClassName(null); assertEquals(EssentialConst.INVALID_CLASS_NAME, name); name = GlobalUtils.createClassName(":"); assertEquals(EssentialConst.INVALID_CLASS_NAME, name); name = GlobalUtils.createClassName("foo:"); assertEquals("Foo", name); name = GlobalUtils.createClassName("foo:bar"); assertEquals("Bar", name); }