private static ThrowingConsumer<ExecutionException> restServiceExceptionChecker(RestServiceErrorCode errorCode) {
    return executionException -> assertEquals("Unexpected error code", errorCode,
        ((RestServiceException) executionException.getCause()).getErrorCode());
  }
@param errorCode the expected error code.
@return a {@link ThrowingConsumer} that will check that the {@link ExecutionException} was caused by a
        {@link RestServiceException} with the specified error code.
ambry-frontend/src/test/java/com/github/ambry/frontend/NamedBlobPutHandlerTest.java