ThrowingConsumer<RestServiceException> errorCodeChecker(RestServiceErrorCode restServiceErrorCode) {
    return restServiceException -> assertEquals("Wrong RestServiceErrorCode in " + restServiceException,
        restServiceErrorCode, restServiceException.getErrorCode());
  }
@param restServiceErrorCode the expected error code for the {@link RestServiceException} thrown.
@return a {@link ThrowingConsumer} to use with {@link com.github.ambry.utils.TestUtils#assertException}.
ambry-frontend/src/test/java/com/github/ambry/frontend/AmbryIdSigningServiceTest.java