@Test
  public void testRouterBasic() throws Exception {
    try {
      setRouter();
      assertExpectedThreadCounts(2, 1);
      testRouterBasicForRegularBlob();
      testRouterBasicForStitchedBlob();
    } finally {
      if (router != null) {
        router.close();
        assertExpectedThreadCounts(0, 0);

        //submission after closing should return a future that is already done.
        assertClosed();
      }
    }
  }
Test Router with a single scaling unit.
ambry-router/src/test/java/com/github/ambry/router/NonBlockingRouterTest.java