@Test
  public void handleGoodCaseTest() throws Exception {
    setupBlob();
    // 1. Test undelete a deleted blob
    RestRequest restRequest = new MockRestRequest(MockRestRequest.DUMMY_DATA, null);
    restRequest.setArg(RestUtils.Headers.BLOB_ID, blobId);
    restRequest.setArg(RestUtils.Headers.SERVICE_ID, SERVICE_ID);
    verifyUndelete(restRequest, REF_ACCOUNT, REF_CONTAINER);

    // 2. Test undelete it again
    router.deleteBlob(blobId, SERVICE_ID).get(1, TimeUnit.SECONDS);
    restRequest = new MockRestRequest(MockRestRequest.DUMMY_DATA, null);
    restRequest.setArg(RestUtils.Headers.BLOB_ID, blobId);
    restRequest.setArg(RestUtils.Headers.SERVICE_ID, SERVICE_ID);
    verifyUndelete(restRequest, REF_ACCOUNT, REF_CONTAINER);
  }
Tests the case where undelete succeeds
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/UndeleteHandlerTest.java