### Question:
ProxyServer { public FutureTask<ProxyServer> run() { FutureTask<ProxyServer> future = new FutureTask<>(new Callable<ProxyServer>() { @Override public ProxyServer call() throws Exception { bootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool())); FiltersChangeNotifier changeNotifier = filtersChangeNotifier != null ? filtersChangeNotifier : FiltersChangeNotifier.IGNORE; CommonHttpPipeline pipelineFactory = new CommonHttpPipeline(TIMER); changeNotifier.addFiltersListener(pipelineFactory); bootstrap.setPipelineFactory(pipelineFactory); bootstrap.setOption("child.tcpNoDelay", true); bootstrap.setOption("child.connectTimeoutMillis", 2000); bootstrap.setOption("child.receiveBufferSizePredictor", new AdaptiveReceiveBufferSizePredictor()); channel = bootstrap.bind(new InetSocketAddress(port)); LOG.info("server bound to port {}", port); LOG.info("current handlers registred {}", pipelineFactory.getPipeline().getNames()); return ProxyServer.this; } }); final Thread thread = new Thread(future, "Proxy Server"); thread.start(); return future; } ProxyServer(int port); ProxyServer setFiltersChangeNotifier(FiltersChangeNotifier filtersChangeNotifier); FutureTask<ProxyServer> run(); boolean isRunning(); FutureTask<ProxyServer> stop(); static void main(String[] args);  }### Answer:
@Test public void startsAndStopsServer() throws Exception { proxyServer = new ProxyServer(9090).run().get(); assertTrue(proxyServer != null); }