@Test
  public void testOriginDcNotFoundError() throws Exception {
    assertCloseCleanup(router);
    Properties props = getNonBlockingRouterProperties();
    props.setProperty("router.delete.request.parallelism", "1");
    props.setProperty("router.operation.tracker.terminate.on.not.found.enabled", "true");
    props.setProperty("router.operation.tracker.check.all.originating.replicas.for.not.found", "false");
    VerifiableProperties vProps = new VerifiableProperties(props);
    RouterConfig routerConfig = new RouterConfig(vProps);
    router = new NonBlockingRouter(routerConfig, new NonBlockingRouterMetrics(clusterMap, routerConfig),
        new MockNetworkClientFactory(vProps, mockSelectorState, MAX_PORTS_PLAIN_TEXT, MAX_PORTS_SSL,
            CHECKOUT_TIMEOUT_MS, serverLayout, mockTime), new LoggingNotificationSystem(), clusterMap, null, null, null,
        new InMemAccountService(false, true), mockTime, MockClusterMap.DEFAULT_PARTITION_CLASS, null);
    blobId =
        new BlobId(routerConfig.routerBlobidCurrentVersion, BlobId.BlobIdType.NATIVE, clusterMap.getLocalDatacenterId(),
            Utils.getRandomShort(TestUtils.RANDOM), Utils.getRandomShort(TestUtils.RANDOM), partition, false,
            BlobId.BlobDataType.DATACHUNK);
    blobIdString = blobId.getID();
    ServerErrorCode[] serverErrorCodes = new ServerErrorCode[9];
    Arrays.fill(serverErrorCodes, ServerErrorCode.IOError);
    serverErrorCodes[0] = ServerErrorCode.BlobNotFound;
    serverErrorCodes[1] = ServerErrorCode.BlobNotFound;
    // The first two responses are blob not found and they are from the local dc and originating dc.
    // So even if the rest of servers returns No_Error, router will not send any requests to them.
    testWithErrorCodes(serverErrorCodes, partition, serverLayout, RouterErrorCode.BlobDoesNotExist,
        deleteErrorCodeChecker, localDc);
  }
Test the case when getting NOT_FOUND error from origin DC while termination on NOT_FOUND is enabled.
ambry-router/src/test/java/com/github/ambry/router/DeleteManagerTest.java