@TestOnly
  public static void dispatchAllInvocationEvents() {
    try (AccessToken ignored = ThreadContext.resetThreadContext()) {
      EDT.dispatchAllInvocationEvents();
    }
  }
@TestOnly
  public static void dispatchAllInvocationEvents()