@Test
  public void testForceDeleteIgnoreSuccessResponse() throws Exception {
    String serviceID = "delete-service";
    MockServerLayout layout = new MockServerLayout(mockClusterMap);
    String localDcName = mockClusterMap.getDatacenterName(mockClusterMap.getLocalDatacenterId());
    setRouter(getNonBlockingRouterPropertiesForRepairRequests(localDcName, false, false, 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();

    boolean setSuccess = false;
    for (MockServer server : layout.getMockServers()) {
      if (!setSuccess) {
        server.setServerErrorForAllRequests(ServerErrorCode.NoError); // one replica to return success
        setSuccess = true;
      } else {
        server.setServerErrorForAllRequests(ServerErrorCode.ReplicaUnavailable); // replicas rejects all delete requests
      }
    }
    // We have only one success, and we disabled ODR and offline repair, however, we shouldn't do force delete

    long forceDeleteCountBefore = routerMetrics.forceDeleteBlobCount.getCount();
    try {
      router.deleteBlob(blobId, serviceID).get();
    } catch (Exception e) {
      RouterException r = (RouterException) e.getCause();
      Assert.assertEquals("BlobDeleted error is expected", RouterErrorCode.AmbryUnavailable, r.getErrorCode());
    } finally {
      assertEquals(forceDeleteCountBefore, routerMetrics.forceDeleteBlobCount.getCount());
      layout.getMockServers().forEach(mockServer -> mockServer.setServerErrorForAllRequests(null));
      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