@TestOnly
  public static void leaveAllModals() {
    ThreadingAssertions.assertEventDispatchThread();
    while (!ourModalEntities.isEmpty()) {
      leaveModal(ourModalEntities.get(ourModalEntities.size() - 1));
    }
    LOG.assertTrue(getCurrentModalityState() == ModalityState.nonModal(), getCurrentModalityState());
    reincludeSkippedItemsAndRequestFlush();
  }
@TestOnly
  public static void leaveAllModals()