@Test
  public void undeleteEnableDisableTest() throws Exception {
    Assume.assumeTrue(
        MessageFormatRecord.getCurrentMessageHeaderVersion() >= MessageFormatRecord.Message_Header_Version_V3);
    Properties properties = createProperties(validateRequestOnStoreState, false);
    VerifiableProperties verifiableProperties = new VerifiableProperties(properties);
    ServerConfig serverConfig = new ServerConfig(verifiableProperties);
    ServerMetrics serverMetrics =
        new ServerMetrics(clusterMap.getMetricRegistry(), AmbryRequests.class, AmbryServer.class);
    AmbryServerRequests other = new AmbryServerRequests(storageManager, requestResponseChannel, clusterMap, dataNodeId,
        clusterMap.getMetricRegistry(), serverMetrics, findTokenHelper, null, replicationManager, null, serverConfig,
        diskManagerConfig, storeKeyConverterFactory, statsManager, null);

    AmbryServerRequests temp = ambryRequests;
    ambryRequests = other;
    try {
      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);
      long opTimeMs = SystemTime.getInstance().milliseconds();
      doUndelete(correlationId++, clientId, blobId, opTimeMs, ServerErrorCode.TemporarilyDisabled);
    } finally {
      ambryRequests = temp;
    }
  }
Tests for server config to enable and disable UNDELETE
ambry-server/src/test/java/com/github/ambry/server/AmbryServerRequestsTest.java