private void verifyFailureWithErrorCode(RestRequest restRequest, RestServiceErrorCode errorCode) throws Exception {
    try {
      sendRequestGetResponse(restRequest, new MockRestResponseChannel());
      fail("Request should have failed");
    } catch (RestServiceException e) {
      assertEquals("Unexpected RestServiceErrorCode", errorCode, e.getErrorCode());
    }
  }
Verifies that processing {@code restRequest} fails with {@code errorCode}
@param restRequest the {@link RestRequest} that is expected to fail
@param errorCode the {@link RestServiceErrorCode} that it should fail with
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/TtlUpdateHandlerTest.java