@Test
  public void testForceDeleteForSimpleBlobSuccess() throws Exception {
    String serviceID = "delete-service";
    MockServerLayout layout = new MockServerLayout(mockClusterMap);
    String localDcName = mockClusterMap.getDatacenterName(mockClusterMap.getLocalDatacenterId());
    setRouter(getNonBlockingRouterPropertiesForRepairRequests(localDcName, true, true, true), layout,
        new LoggingNotificationSystem());
    // Create a random id that doesn't exist
    List<PartitionId> mockPartitions = mockClusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS);
    PartitionId partition = mockPartitions.get(ThreadLocalRandom.current().nextInt(mockPartitions.size()));
    String blobId = new BlobId(routerConfig.routerBlobidCurrentVersion, BlobId.BlobIdType.NATIVE,
        mockClusterMap.getLocalDatacenterId(), Utils.getRandomShort(TestUtils.RANDOM),
        Utils.getRandomShort(TestUtils.RANDOM), partition, false, BlobId.BlobDataType.DATACHUNK).getID();

    List<MockServer> localServers = new ArrayList<>();
    for (MockServer server : layout.getMockServers()) {
      if (server.getDataCenter().equals(localDcName)) {
        localServers.add(server);
        server.setServerErrors(Collections.singletonList(ServerErrorCode.ReplicaUnavailable));
      } else {
        server.setServerErrorForAllRequests(ServerErrorCode.BlobNotFound);
      }
    }
    // After set server errors, we would see
    // 1. when issuing regular delete requests, we have three originating replicas returning unavailable, and others return NOT_FOUND
    //    this would result in unavailable and would trigger force delete
    // 2. when force delete, all servers return No Error.
    //    delete parallelism is 3, so 3 originating replicas would have delete tombstones

    long forceDeleteCountBefore = routerMetrics.forceDeleteBlobCount.getCount();
    try {
      router.deleteBlob(blobId, serviceID).get();
    } catch (Exception e) {
      fail("Expecting force delete to work");
    } finally {
      assertEquals(forceDeleteCountBefore + 1, routerMetrics.forceDeleteBlobCount.getCount());
      layout.getMockServers().forEach(mockServer -> mockServer.setServerErrorForAllRequests(null));
      for (MockServer server : localServers) {
        StoredBlob sblob = server.getBlobs().get(blobId);
        assertNotNull(sblob);
        assertTrue(sblob.isDeleted());
        assertTrue(sblob.isDeleteTombstone());
      }
      router.getNotFoundCache().invalidateAll();
      if (router != null) {
        router.close();
      }
    }
  }
Test On-Demand Replication on deletion success case. And the service id of the delete request is null.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/NonBlockingRouterTest.java