### Question:
AndroidInteropSchedulers { public static Scheduler mainThread() { return AndroidInteropPlugins.onMainThreadScheduler(MAIN_THREAD); } private  AndroidInteropSchedulers(); static Scheduler mainThread(); static Scheduler from(Looper looper); @SuppressLint("NewApi") // Checking for an @hide API. static Scheduler from(Looper looper, boolean async);  }### Answer:
@Test public void mainThreadCallsThroughToHook() { final AtomicInteger called = new AtomicInteger(); final Scheduler newScheduler = new EmptyScheduler(); AndroidInteropPlugins.setMainThreadSchedulerHandler(new Function<Scheduler, Scheduler>() { @Override public Scheduler apply(Scheduler scheduler) { called.getAndIncrement(); return newScheduler; } }); assertSame(newScheduler, AndroidInteropSchedulers.mainThread()); assertEquals(1, called.get()); assertSame(newScheduler, AndroidInteropSchedulers.mainThread()); assertEquals(2, called.get()); }