@Test
  public void testRouterFactory() throws Exception {
    VerifiableProperties verifiableProperties = getVerifiableProperties();
    InMemAccountService accountService = new InMemAccountService(false, true);
    List<FactoryAndRouter> factoryAndRouters = new ArrayList<FactoryAndRouter>();
    factoryAndRouters.add(new FactoryAndRouter("com.github.ambry.router.NonBlockingRouterFactory",
        "com.github.ambry.router.NonBlockingRouter"));

    for (FactoryAndRouter factoryAndRouter : factoryAndRouters) {
      RouterFactory routerFactory =
          Utils.getObj(factoryAndRouter.factoryStr, verifiableProperties, new MockClusterMap(),
              new LoggingNotificationSystem(), null, accountService);
      Router router = routerFactory.getRouter();
      Assert.assertEquals("Did not receive expected Router instance", factoryAndRouter.routerStr,
          router.getClass().getCanonicalName());
      router.close();
    }
  }
Tests the instantiation of a {@link Router} implementation through its {@link RouterFactory} implementation
@throws IOException
ambry-router/src/test/java/com/github/ambry/router/RouterFactoryTest.java