public void invokeCallback(Exception exception) {
      if (callbackInvoked.compareAndSet(false, true)) {
        futureResult.done(totalBytesRead.get(), exception);
        if (callback != null) {
          callback.onCompletion(totalBytesRead.get(), exception);
        }
      }
    }
Invokes the callback and updates the future once this is called. This function ensures that the callback is invoked
just once.
@param exception the {@link Exception}, if any, to pass to the callback.
ambry-test-utils/src/main/java/com/github/ambry/rest/MockRestRequest.java