### Question:
RxAndroidPlugins { public static Scheduler initMainThreadScheduler(Callable<Scheduler> scheduler) { if (scheduler == null) { throw new NullPointerException("scheduler == null"); } Function<Callable<Scheduler>, Scheduler> f = onInitMainThreadHandler; if (f == null) { return callRequireNonNull(scheduler); } return applyRequireNonNull(f, scheduler); } private  RxAndroidPlugins(); static void setInitMainThreadSchedulerHandler(Function<Callable<Scheduler>, Scheduler> handler); static Scheduler initMainThreadScheduler(Callable<Scheduler> scheduler); static void setMainThreadSchedulerHandler(Function<Scheduler, Scheduler> handler); static Scheduler onMainThreadScheduler(Scheduler scheduler); static Function<Callable<Scheduler>, Scheduler> getInitMainThreadSchedulerHandler(); static Function<Scheduler, Scheduler> getOnMainThreadSchedulerHandler(); static void reset();  }### Answer:
@Test public void overrideInitMainSchedulerThrowsWhenSchedulerCallableIsNull() { try { RxAndroidPlugins.initMainThreadScheduler(null); fail(); } catch (NullPointerException e) { assertEquals("scheduler == null", e.getMessage()); } }
@Test public void overrideInitMainSchedulerThrowsWhenSchedulerCallableReturnsNull() { Callable<Scheduler> nullResultCallable = new Callable<Scheduler>() { @Override public Scheduler call() throws Exception { return null; } }; try { RxAndroidPlugins.initMainThreadScheduler(nullResultCallable); fail(); } catch (NullPointerException e) { assertEquals("Scheduler Callable returned null", e.getMessage()); } }