DefaultDisplayCoordinator extends DisplayCoordinator { @MainThread @Override public void onDisplayFinished(@NonNull InAppMessage message) { currentMessage = null; mainHandler.postDelayed(postDisplayRunnable, displayInterval); } DefaultDisplayCoordinator(long displayInterval); @MainThread @Override boolean isReady(); @MainThread @Override void onDisplayStarted(@NonNull InAppMessage message); @MainThread @Override void onDisplayFinished(@NonNull InAppMessage message);  }
@Test public void onDisplayFinished() { assertTrue(coordinator.isReady()); coordinator.onDisplayStarted(messageTwo); assertFalse(coordinator.isReady()); coordinator.onDisplayFinished(messageTwo); assertFalse(coordinator.isReady()); Shadows.shadowOf(mainLooper).runToEndOfTasks(); assertTrue(coordinator.isReady()); }