private static void waitForInvokeLaterActivities() {
    for (int i = 0; i < 3; i++) {
      ApplicationManager.getApplication().invokeAndWait(() -> { }, ModalityState.any());
    }
  }
private static void waitForInvokeLaterActivities()