code: public void done(T response) throws IllegalArgumentException {
          lock.lock();
          try {
              if (response != null) {
                  this.response = response;
                  condition.signal();
              } else {
                  throw new IllegalArgumentException("response cannot be null");
              }
          } finally {
              lock.unlock();
          }
      }
docs: Done with valid response and notify that response already received.
  
  @param response is the response.
  @throws IllegalArgumentException thrown if response is null.