@Override
  public @NotNull RemoteCallResult invoke(@NotNull RemoteCall call) {
    Object[] transformedArgs = transformArgs(call);

    Object result;

    if (call instanceof NewInstanceCall) {
      Class<?> targetClass = getTargetClass(call);
      Constructor<?> constructor = getConstructor(call, targetClass, transformedArgs);

      LOG.debug("Creating instance of " + targetClass);

      result = withSemantics(call, () -> invokeConstructor(constructor, transformedArgs));

      return getRemoteCallResult(sessions.get(call.getSessionId()), result);
    }

    CallTarget callTarget = getCallTarget(call, transformedArgs);
    LOG.debug("Calling " + callTarget);

    Object instance;
    try {
      instance = findInstance(call, callTarget.clazz());
    }
    catch (Exception e) {
      //we need to ignore caching check and not throw error
      if (!call.getMethodName().equals("isShowing")) {
        LOG.error("Unable to get instance for " + call);
      }

      throw new DriverIlligalStateException("Unable to get instance for " + call, e);
    }

    if (call.getDispatcher() == OnDispatcher.EDT) {
      Object[] res = new Object[1];
      ModalityState[] modalityState = new ModalityState[1];
      try {
        SwingUtilities.invokeAndWait(() -> {
          modalityState[0] = ModalityState.current();
        });
      }
      catch (Throwable e) {
        throw new RuntimeException(e);
      }
      ApplicationManager.getApplication().invokeAndWait(() -> {
        res[0] = withSemantics(call, () -> invokeMethod(callTarget, instance, transformedArgs));
      }, modalityState[0]);
      result = res[0];
    }
    else {
      // todo handle OnDispatcher: Default or IO
      result = withSemantics(call, () -> invokeMethod(callTarget, instance, transformedArgs));
    }

    return getRemoteCallResult(sessions.get(call.getSessionId()), callTarget, result);
  }
@Override
  public @NotNull RemoteCallResult invoke(@NotNull RemoteCall call)