ClassName { public static String simplifiedModuleName(String moduleName) { if (StringUtils.isBlank(moduleName)) { return moduleName; } String parsedName = moduleName.toLowerCase(); parsedName = parsedName.replace(" ", ""); if (parsedName.startsWith(MOTECH_PREFIX)) { int index = (parsedName.startsWith(MOTECHPLATFORM_PREFIX)) ? MOTECHPLATFORM_PREFIX.length() : MOTECH_PREFIX.length(); parsedName = parsedName.substring(index); } return parsedName; } private  ClassName(); static String getSimpleName(String className); static String getPackage(String className); static String getHistoryClassName(String className); static String getTrashClassName(String className); static String getEntityClassName(String simpleName); static String getRepositoryName(String className); static String getInterfaceName(String className); static String getServiceClassName(String className); static String getServiceName(String className); static String trimTrashHistorySuffix(String name); static String getEntityTypeSuffix(String name); static boolean isTrashClassName(String className); static boolean isHistoryClassName(String className); static String restId(String entityName, String module, String namespace); static String restUrl(String entityName, String entityModule, String entityNamespace); static String restLookupUrl(String entityName, String entityModule, String entityNamespace,
                                       String lookupMethodName); static String simplifiedModuleName(String moduleName); static String getEnumPackage(String className);  }
@Test public void shouldParseModuleNamesForRest() { assertNull(ClassName.simplifiedModuleName(null)); assertEquals("", ClassName.simplifiedModuleName("")); assertEquals("admin", ClassName.simplifiedModuleName("MOTECH Admin")); }