private <T> void completeOperation(FutureResult<T> futureResult, Callback<T> callback, T operationResult,
      Exception exception) {
    RuntimeException runtimeException = null;
    if (exception != null) {
      runtimeException = new RuntimeException(exception);
    }
    futureResult.done(operationResult, runtimeException);
    if (callback != null) {
      callback.onCompletion(operationResult, exception);
    }
  }
Completes a router operation by invoking the {@code callback} and setting the {@code futureResult} with
{@code operationResult} (if any) and {@code exception} (if any).
@param futureResult the {@link FutureResult} that needs to be set.
@param callback that {@link Callback} that needs to be invoked. Can be null.
@param operationResult the result of the operation (if any).
@param exception {@link Exception} encountered while performing the operation (if any).
@param <T> the type of {@code futureResult}, {@code callback} and {@code operationResult}.
ambry-tools/src/main/java/com/github/ambry/tools/perf/rest/PerfRouter.java