protected Pair<StorageManager, ReplicationManager> createStorageManagerAndReplicationManager(ClusterMap clusterMap,
      ClusterMapConfig clusterMapConfig, MockHelixParticipant clusterParticipant,
      MockNetworkClientFactory mockNetworkClientFactory) throws Exception {
    StoreConfig storeConfig = new StoreConfig(verifiableProperties);
    DataNodeId dataNodeId = clusterMap.getDataNodeIds().get(0);

    MockStoreKeyConverterFactory storeKeyConverterFactory = new MockStoreKeyConverterFactory(null, null);
    storeKeyConverterFactory.setConversionMap(new HashMap<>());
    storeKeyConverterFactory.setReturnInputIfAbsent(true);

    StoreKeyFactory storeKeyFactory = new BlobIdFactory(clusterMap);

    StorageManager storageManager =
        new StorageManager(storeConfig, new DiskManagerConfig(verifiableProperties), Utils.newScheduler(1, true),
            new MetricRegistry(), null, clusterMap, dataNodeId, null,
            clusterParticipant == null ? null : Collections.singletonList(clusterParticipant), new MockTime(), null,
            new InMemAccountService(false, false));
    storageManager.start();

    MockReplicationManager replicationManager =
        new MockReplicationManager(replicationConfig, clusterMapConfig, storeConfig, storageManager, clusterMap,
            dataNodeId, storeKeyConverterFactory, clusterParticipant, mockNetworkClientFactory,
            mockNetworkClientFactory.getFindTokenHelper(), BlobIdTransformer.class.getName(), storeKeyFactory, time,
            null);

    return new Pair<>(storageManager, replicationManager);
  }
Helper method to create storage manager and replication manager
@param clusterMap {@link ClusterMap} to use
@param clusterMapConfig {@link ClusterMapConfig} to use
@param clusterParticipant {@link com.github.ambry.clustermap.ClusterParticipant} for listener registration.
@return a pair of storage manager and replication manager
@throws Exception
ambry-replication/src/test/java/com/github/ambry/replication/ReplicationTestHelper.java