private void ensureVerificationFailure(AmbryUrlSigningService signer, RestRequest request,
      RestServiceErrorCode errorCode) {
    try {
      signer.verifySignedRequest(request);
      fail("Verification of request should have failed");
    } catch (IllegalArgumentException e) {
      assertNull("Did not encounter a RestServiceException with given error code", errorCode);
      assertFalse("URL should have been declared as not signed", signer.isRequestSigned(request));
    } catch (RestServiceException e) {
      assertEquals("Unexpected RestServiceErrorCode", errorCode, e.getErrorCode());
    }
  }
Ensures that the verification of {@code url} fails.
@param signer the {@link AmbryUrlSigningService} to use.
@param request the {@link RestRequest} which contains the url to check
@param errorCode the {@link RestServiceErrorCode} expected on verification. If {@code null}, it is assumed that a
                 {@link IllegalArgumentException} is expected.
ambry-frontend/src/test/java/com/github/ambry/frontend/AmbryUrlSigningServiceTest.java