### Question:
ServerBootstrap extends Bootstrap { public ChannelFuture bindAsync() { SocketAddress localAddress = (SocketAddress) getOption("localAddress"); if (localAddress == null) { throw new IllegalStateException("localAddress option is not set."); } return bindAsync(localAddress); } ServerBootstrap();  ServerBootstrap(ChannelFactory channelFactory); @Override void setFactory(ChannelFactory factory); ChannelHandler getParentHandler(); void setParentHandler(ChannelHandler parentHandler); Channel bind(); Channel bind(final SocketAddress localAddress); ChannelFuture bindAsync(); ChannelFuture bindAsync(final SocketAddress localAddress);  }### Answer:
@Test public void testBindAsync() { ServerBootstrap bootstrap = newBootstrap(); bootstrap.setFactory(new NioServerSocketChannelFactory()); ChannelFuture future = bootstrap.bindAsync(new InetSocketAddress(0)); future.awaitUninterruptibly(); assertTrue(future.isSuccess()); future.getChannel().close().awaitUninterruptibly(); }