### Question:
WXSDKEngine implements Serializable { public static boolean registerComponent(String type, Class<? extends WXComponent> clazz, boolean appendTree) throws WXException { return registerComponent(clazz, appendTree,type); }  @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 boolean isSoInitialized(); 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 registerModuleWithFactory(String moduleName, IExternalModuleGetter factory, boolean global); static boolean registerModule(String moduleName, ModuleFactory factory, boolean global); static boolean registerModule(String moduleName, Class<? extends WXModule> moduleClass); static boolean registerService(String name, String serviceScript, Map<String, Object> options); static boolean unRegisterService(String name); 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 IWXJsFileLoaderAdapter getIWXJsFileLoaderAdapter(); static IActivityNavBarSetter getActivityNavBarSetter(); static INavigator getNavigator(); static void setNavigator(INavigator navigator); static void setActivityNavBarSetter(IActivityNavBarSetter activityNavBarSetter); static void reload(final Context context,String framework, boolean remoteDebug); static void reload(final Context context, boolean remoteDebug); static void reload(); static void registerCoreEnv(String key, String value); static final String JS_FRAMEWORK_RELOAD; }### Answer:
@Test public void testRegisterComponent() throws Exception { assertFalse(WXSDKEngine.registerComponent(null,(Class<? extends WXComponent>) null,true)); assertTrue(WXSDKEngine.registerComponent("test", TestComponent.class,true)); assertTrue(WXSDKEngine.registerComponent("test1",TestComponent.class)); assertTrue(WXSDKEngine.registerComponent(TestComponent.class,false,"testA","testB","testC")); Map<String,Object> compInfo = new HashMap<>(); assertFalse(WXSDKEngine.registerComponent(compInfo,TestComponent.class)); }