@Test
  public void forceDeleteEnabledTest() throws StoreException, IOException, InterruptedException {
    assumeFalse(this.validateRequestOnStoreState);
    MockPartitionId id = (MockPartitionId) clusterMap.getWritablePartitionIds(DEFAULT_PARTITION_CLASS).get(0);
    int correlationId = TestUtils.RANDOM.nextInt();
    String clientId = TestUtils.getRandomString(10);
    BlobId blobId = new BlobId(CommonTestUtils.getCurrentBlobIdVersion(), BlobId.BlobIdType.NATIVE,
        ClusterMap.UNKNOWN_DATACENTER_ID, Utils.getRandomShort(TestUtils.RANDOM),
        Utils.getRandomShort(TestUtils.RANDOM), id, false, BlobId.BlobDataType.DATACHUNK);
    RequestOrResponse request =
        new DeleteRequest(correlationId, clientId, blobId, SystemTime.getInstance().milliseconds(), (short) 3, true);
    BlobStore mockStore = Mockito.mock(BlobStore.class);
    storageManager.overrideStoreToReturn = mockStore;
    mockStore.setCurrentState(ReplicaState.STANDBY);
    doThrow(new StoreException("Blob is not found", StoreErrorCodes.IDNotFound)).when(mockStore).delete(anyList());
    doNothing().when(mockStore).forceDelete(anyList());
    // Operation should succeed
    sendRequestGetResponse(request, ServerErrorCode.NoError);
    // Verify delete and forceDelete are called
    Mockito.verify(mockStore, atLeastOnce()).delete(anyList());
    Mockito.verify(mockStore, atLeastOnce()).forceDelete(anyList());
    storageManager.overrideStoreToReturn = null;
  }
Tests that delete operation on a non-existent blob succeeds when 'isForceDelete' flag is
 enabled in 'DeleteRequest'
ambry-server/src/test/java/com/github/ambry/server/AmbryServerRequestsTest.java