### Question:
ZooKeeperRegistrarService extends AbstractIdleService { @Override protected void shutDown() throws Exception { reactor.stopAsync().awaitTerminated(); zooKeeperRegistrar.shutDown(); } private  ZooKeeperRegistrarService(final Builder builder); static Builder newBuilder();  }### Answer:
@Test public void testShutdown() throws Exception { final ZooKeeperRegistrar zooKeeperRegistrar = createStubRegistrar(true); final ZooKeeperRegistrarService init = ZooKeeperRegistrarService.newBuilder() .setZooKeeperClient(zkClient) .setZooKeeperRegistrar(zooKeeperRegistrar) .build(); init.startUp(); assertNull(complete.get(3000, MILLISECONDS)); init.shutDown(); assertNull(shutdownComplete.get(3000, MILLISECONDS)); }