private Router getRouter() throws Exception {
    // Create a HelixAccountService for the router.
    AccountServiceFactory accountServiceFactory =
        Utils.getObj("com.github.ambry.account.HelixAccountServiceFactory", verifiableProperties, registry);
    accountService = (HelixAccountService) accountServiceFactory.getAccountService();

    ClusterMapConfig clusterMapConfig = new ClusterMapConfig(verifiableProperties);
    ClusterAgentsFactory clusterAgentsFactory =
        Utils.getObj(clusterMapConfig.clusterMapClusterAgentsFactory, clusterMapConfig, hardwareLayout,
            partitionLayout);
    clusterMap = clusterAgentsFactory.getClusterMap();
    SSLFactory sslFactory = getSSLFactoryIfRequired();
    // Create a NonBlockingRouter.
    RouterFactory routerFactory =
        Utils.getObj("com.github.ambry.router.NonBlockingRouterFactory", verifiableProperties, clusterMap,
            new LoggingNotificationSystem(), sslFactory, accountService);
    router = routerFactory.getRouter();
    return router;
  }
Create a {@link Router} for {@link RouterStore}.
@return The {@link Router}.
@throws Exception Any unexpected exception.
ambry-tools/src/main/java/com/github/ambry/account/AccountTool.java