### Question:
GodEyeHelper { public static void onAppStartEnd(StartupInfo startupInfo) throws UninstallException { GodEye.instance().<Startup>getModule(GodEye.ModuleName.STARTUP).produce(startupInfo); L.d("GodEyeHelper onAppStartEnd: " + startupInfo); }  static void onPageLoaded(Object page); static void onFragmentPageVisibilityChange(Object fragmentPage, boolean visible); static void onAppStartEnd(StartupInfo startupInfo); static void onNetworkEnd(NetworkInfo networkInfo); @Deprecated static void inspectView(); static void startMethodCanaryRecording(String tag); static void stopMethodCanaryRecording(String tag); static boolean isMethodCanaryRecording(String tag); static void setMonitorAppInfoConext(AppInfoConext appInfoConext); static void startMonitor(int port); static void startMonitor(); static void shutdownMonitor();  }### Answer:
@Test public void onAppStartEndWhenNotInstalled() { try { GodEye.instance().uninstall(); GodEyeHelper.onAppStartEnd(null); fail(); } catch (UninstallException ignore) { } }
@Test public void onAppStartEndWhenNull() { try { GodEye.instance().uninstall(); GodEye.instance().install(GodEyeConfig.noneConfigBuilder().withStartupConfig(new StartupConfig()).build()); GodEyeHelper.onAppStartEnd(null); } catch (NullPointerException ignore) { } catch (UninstallException e) { fail(); } }
@Test public void onAppStartEndSuccess() { try { GodEye.instance().uninstall(); GodEye.instance().install(GodEyeConfig.noneConfigBuilder().withStartupConfig(new StartupConfig()).build()); StartupInfo startupInfo = new StartupInfo(StartupInfo.StartUpType.COLD, 3000); GodEyeHelper.onAppStartEnd(startupInfo); TestObserver testObserver = GodEye.instance().<Startup, StartupInfo>moduleObservable(GodEye.ModuleName.STARTUP).test(); testObserver.assertValue(new Predicate<StartupInfo>() { @Override public boolean test(StartupInfo o) throws Exception { return startupInfo.startupType.equals(o.startupType) && startupInfo.startupTime == o.startupTime; } }); } catch (Throwable e) { fail(); } }