### Question:
BillingUtils { public static ModuleType getModuleType(Class<?> moduleClass) { if (classChildOf(moduleClass, AdapterBase.class)) { return ModuleType.ADAPTER; } else if (classChildOf(moduleClass, FilterBase.class)) { return ModuleType.FILTER; } else if (classChildOf(moduleClass, ParserBase.class)) { return ModuleType.PARSER; } else if (classChildOf(moduleClass, AppenderBase.class)) { return ModuleType.LOGAPPENDER; } return null; } private  BillingUtils(); static Map<String, String> stringsToMap(String ... keyValues); static List<String> getResourceAsList(String resourceName); static List<Class<?>> getModuleClassList(); static boolean classChildOf(Class<?> child, Class<?> parent); static ModuleType getModuleType(Class<?> moduleClass); static String getSimpleUserName(String username);  }### Answer:
@Test public void getModuleType() { assertEquals(ModuleType.ADAPTER, BillingUtils.getModuleType(AdapterConsole.class)); assertEquals(ModuleType.ADAPTER, BillingUtils.getModuleType(AdapterFile.class)); assertEquals(ModuleType.ADAPTER, BillingUtils.getModuleType(AdapterS3File.class)); assertEquals(ModuleType.ADAPTER, BillingUtils.getModuleType(AdapterMongoDb.class)); assertEquals(ModuleType.FILTER, BillingUtils.getModuleType(FilterAWS.class)); assertEquals(ModuleType.PARSER, BillingUtils.getModuleType(ParserCsv.class)); assertEquals(ModuleType.LOGAPPENDER, BillingUtils.getModuleType(AppenderConsole.class)); assertEquals(ModuleType.LOGAPPENDER, BillingUtils.getModuleType(AppenderFile.class)); }