@Test
  public void handleGoodCaseTest() throws Exception {
    urlSigningServiceFactory.signedUrlToReturn = TestUtils.getRandomString(10);
    // POST
    RestRequest restRequest = new MockRestRequest(MockRestRequest.DUMMY_DATA, null);
    restRequest.setArg(RestUtils.InternalKeys.REQUEST_PATH,
        RequestPath.parse("/signedUrl", Collections.emptyMap(), Collections.emptyList(), "Ambry-test"));
    restRequest.setArg(RestUtils.Headers.URL_TYPE, RestMethod.POST.name());
    restRequest.setArg(RestUtils.Headers.TARGET_ACCOUNT_NAME, REF_ACCOUNT.getName());
    restRequest.setArg(RestUtils.Headers.TARGET_CONTAINER_NAME, REF_CONTAINER.getName());
    verifySigningUrl(restRequest, urlSigningServiceFactory.signedUrlToReturn, REF_ACCOUNT, REF_CONTAINER);

    idConverterFactory.translation = testBlobId.getID();
    // GET (also makes sure that the IDConverter is used)
    restRequest = new MockRestRequest(MockRestRequest.DUMMY_DATA, null);
    restRequest.setArg(RestUtils.InternalKeys.REQUEST_PATH,
        RequestPath.parse("/signedUrl", Collections.emptyMap(), Collections.emptyList(), "Ambry-test"));
    restRequest.setArg(RestUtils.Headers.URL_TYPE, RestMethod.GET.name());
    // add a random string. IDConverter will convert it
    restRequest.setArg(RestUtils.Headers.BLOB_ID, TestUtils.getRandomString(10));
    verifySigningUrl(restRequest, urlSigningServiceFactory.signedUrlToReturn, REF_ACCOUNT, REF_CONTAINER);
  }
Handles the case where url signing succeeds
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/GetSignedUrlHandlerTest.java