protected void setRouterWithMetadataCache(Properties props, AmbryCacheStats ambryCacheStats) throws Exception {
    VerifiableProperties verifiableProperties = new VerifiableProperties((props));
    routerConfig = new RouterConfig(verifiableProperties);
    routerMetrics = new NonBlockingRouterMetrics(mockClusterMap, routerConfig);
    AmbryCacheWithStats ambryCacheWithStats =
        new AmbryCacheWithStats("AmbryCacheWithStats", true, routerConfig.routerMaxNumMetadataCacheEntries,
            routerMetrics.getMetricRegistry(), ambryCacheStats);
    router = new NonBlockingRouter(routerConfig, routerMetrics,
        new MockNetworkClientFactory(verifiableProperties, mockSelectorState, MAX_PORTS_PLAIN_TEXT, MAX_PORTS_SSL,
            CHECKOUT_TIMEOUT_MS, mockServerLayout, mockTime), new LoggingNotificationSystem(), mockClusterMap, kms,
        cryptoService, cryptoJobHandler, accountService, mockTime, MockClusterMap.DEFAULT_PARTITION_CLASS,
        ambryCacheWithStats);
  }
Initialize and set the router with the given {@link Properties} and {@link MockServerLayout}
@param props the {@link Properties}
@param serverLayout the {@link MockServerLayout}.
@param notificationSystem the {@link NotificationSystem} to use.
ambry-router/src/test/java/com/github/ambry/router/NonBlockingRouterTestBase.java