@Test
  public void testNumReplThreads() throws ReplicationException, InstantiationException {
    VcrClusterParticipant vcrClusterParticipant = mock(VcrClusterParticipant.class);
    when(vcrClusterParticipant.getCurrentDataNodeId()).thenReturn(clustermap.getCurrentDataNodeId());
    StoreKeyConverterFactory storeKeyConverterFactory = mock(StoreKeyConverterFactory.class);
    StoreKeyConverter storeKeyConverter = mock(StoreKeyConverter.class);
    when(storeKeyConverterFactory.getStoreKeyConverter()).thenReturn(storeKeyConverter);
    VcrReplicationManager manager =
        new VcrReplicationManager(properties, null, null, clustermap,
            vcrClusterParticipant, mock(AzureCloudDestinationSync.class), null,
            mock(NetworkClientFactory.class), null, storeKeyConverterFactory);
    assertEquals(0, manager.getNumReplThreads(0));
    assertEquals(2, manager.getNumReplThreads(-2.5));
    assertEquals((int) (Double.valueOf(Runtime.getRuntime().availableProcessors()) * 2.5),
        manager.getNumReplThreads(2.5));
  }
Tests that expected number of repl threads are created based on cpu scaling factor
@throws ReplicationException
ambry-cloud/src/test/java/com/github/ambry/cloud/VcrReplicaThreadTest.java