docs: public R performActionAndWaitForEvent(K eventKey, long timeout, Callback<E> action) throws InterruptedException, E {
          final Reference<R> reference = new Reference<>();
          events.put(eventKey, reference);
          try {
              synchronized (reference) {
                  action.action();
                  reference.wait(timeout);
              }
              return reference.eventResult;
          }
          finally {
              events.remove(eventKey);
          }
      }