### Question:
GodEye { public synchronized <T> T getModule(@ModuleName String moduleName) throws UninstallException { Object moduleObj = mModules.get(moduleName); if (moduleObj == null) { throw new UninstallException("module [" + moduleName + "] is not installed."); } try { return (T) moduleObj; } catch (Throwable e) { throw new UnexpectException("module [" + moduleName + "] has wrong instance type"); } } private  GodEye(); static GodEye instance(); synchronized GodEye install(final GodEyeConfig godEyeConfig, NotificationConfig notificationConfig); GodEye install(final GodEyeConfig godEyeConfig); GodEye install(final GodEyeConfig godEyeConfig, boolean enableNotification); synchronized GodEye uninstall(); synchronized T getModule(@ModuleName String moduleName); synchronized @ModuleName Set<String> getInstalledModuleNames(); Observable<M> moduleObservable(@ModuleName String moduleName); Disposable observeModule(@ModuleName String moduleName, Consumer<M> consumer); Application getApplication(); @Deprecated void init(Application application); static final Set<String> ALL_MODULE_NAMES; }### Answer:
@Test public void getModule() { GodEye.instance().uninstall(); try { GodEye.instance().getModule(null); fail(); } catch (UninstallException ignore) { } try { GodEye.instance().getModule(""); fail(); } catch (UninstallException ignore) { } try { GodEye.instance().getModule(GodEye.ModuleName.STARTUP); fail(); } catch (UninstallException ignore) { } GodEye.instance().install(GodEyeConfig.noneConfigBuilder().withStartupConfig(new StartupConfig()).build()); try { GodEye.instance().getModule(GodEye.ModuleName.STARTUP); } catch (UninstallException e) { fail(); } try { GodEye.instance().<Cpu>getModule(GodEye.ModuleName.STARTUP).config(); fail(); } catch (UninstallException e) { fail(); } catch (ClassCastException ignore) { } }