### Question:
StaticDirectory extends AbstractDirectory<T> { public StaticDirectory(List<Invoker<T>> invokers) { this(null, invokers, null); } StaticDirectory(List<Invoker<T>> invokers);  StaticDirectory(List<Invoker<T>> invokers, RouterChain<T> routerChain);  StaticDirectory(URL url, List<Invoker<T>> invokers);  StaticDirectory(URL url, List<Invoker<T>> invokers, RouterChain<T> routerChain); @Override Class<T> getInterface(); @Override boolean isAvailable(); @Override void destroy(); void buildRouterChain();  }### Answer:
@Test public void testStaticDirectory() { Router router = new ConditionRouterFactory().getRouter(getRouteUrl(" => " + " host = " + NetUtils.getLocalHost())); List<Router> routers = new ArrayList<Router>(); routers.add(router); List<Invoker<String>> invokers = new ArrayList<Invoker<String>>(); Invoker<String> invoker1 = new MockInvoker<String>(URL.valueOf("dubbo: Invoker<String> invoker2 = new MockInvoker<String>(URL.valueOf("dubbo: Invoker<String> invoker3 = new MockInvoker<String>(URL.valueOf("dubbo: invokers.add(invoker1); invokers.add(invoker2); invokers.add(invoker3); List<Invoker<String>> filteredInvokers = router.route(invokers, URL.valueOf("consumer: StaticDirectory<String> staticDirectory = new StaticDirectory<>(filteredInvokers); boolean isAvailable = staticDirectory.isAvailable(); Assertions.assertTrue(!isAvailable); List<Invoker<String>> newInvokers = staticDirectory.list(new MockDirInvocation()); Assertions.assertTrue(newInvokers.size() > 0); staticDirectory.destroy(); Assertions.assertEquals(0, newInvokers.size()); }