### Question:
WXSDKEngine { public static <T extends WXModule> boolean registerModule(String moduleName, Class<T> moduleClass,boolean global) throws WXException { return moduleClass != null && registerModule(moduleName, new TypeModuleFactory<>(moduleClass), global); }  @Deprecated static void init(Application application); @Deprecated static void init(Application application, IWXUserTrackAdapter utAdapter); @Deprecated static void init(Application application, IWXUserTrackAdapter utAdapter, String framework); static boolean isInitialized(); static void initialize(Application application,InitConfig config); @Deprecated static void init(Application application, String framework, IWXUserTrackAdapter utAdapter, IWXImgLoaderAdapter imgLoaderAdapter, IWXHttpAdapter httpAdapter); static void setJSExcetptionAdapter(IWXJSExceptionAdapter excetptionAdapter); static boolean registerComponent(String type, Class<? extends WXComponent> clazz, boolean appendTree); static boolean registerComponent(String type, IExternalComponentGetter componentGetter, boolean appendTree); static boolean registerComponent(Class<? extends WXComponent> clazz, boolean appendTree,String ... names); static boolean registerComponent(IFComponentHolder holder, boolean appendTree, String ... names); static boolean registerModule(String moduleName, Class<T> moduleClass,boolean global); static boolean registerModuleWithFactory(String moduleName, DestroyableModuleFactory factory, boolean global); static boolean registerModule(String moduleName, Class<? extends WXModule> moduleClass); static boolean registerService(String name, String serviceScript, Map<String, String> options); static boolean unRegisterService(String name); static boolean registerDomObject(String type, Class<? extends WXDomObject> clazz); static void callback(String instanceId, String funcId, Map<String, Object> data); static void restartBridge(boolean debug); static boolean registerComponent(String type, Class<? extends WXComponent> clazz); static boolean registerComponent(Map<String, Object> componentInfo, Class<? extends WXComponent> clazz); static void addCustomOptions(String key, String value); static IWXUserTrackAdapter getIWXUserTrackAdapter(); static IWXImgLoaderAdapter getIWXImgLoaderAdapter(); static IDrawableLoader getDrawableLoader(); static IWXHttpAdapter getIWXHttpAdapter(); static IWXStorageAdapter getIWXStorageAdapter(); static IActivityNavBarSetter getActivityNavBarSetter(); static void setActivityNavBarSetter(IActivityNavBarSetter activityNavBarSetter); static void show3DLayer(boolean show); static void switchDebugModel(boolean debug, String debugUrl); static void reload(final Context context,String framework, boolean remoteDebug); static void reload(final Context context, boolean remoteDebug); static void reload(); static final String JS_FRAMEWORK_RELOAD; }### Answer:
@Test public void testRegisterModule() throws Exception { assertTrue(WXSDKEngine.registerModule("test", TestModule.class)); assertFalse(WXSDKEngine.registerModule(null,TestModule.class)); assertFalse(WXSDKEngine.registerModule("test",null)); assertFalse(WXSDKEngine.registerModuleWithFactory(null,new TestModuleFactory(TestModule.class),true)); assertTrue(WXSDKEngine.registerModuleWithFactory("test1",new TestModuleFactory(TestModule.class),true)); assertFalse(WXSDKEngine.registerModuleWithFactory("test1",null,true)); }