### Question:
QueryServer implements AutoCloseable { @VisibleForTesting void run() throws InterruptedException { for (EventExecutor executor : executorGroup) { executor.execute(new NextQueryTask(queryQueue, executor)); } serverBootstrap.bind().sync(); } @JsonCreator private  QueryServer(@JsonProperty(value = "webPort", required = true) int webPort,
                        @JsonProperty(value = "queryThreads", required = true) int queryThreads,
                        @JsonProperty(value = "queryThreadFactory", required = true) ThreadFactory queryThreadFactory
    ); static void main(String[] args); @Override void close();  }### Answer:
@Test public void simpleMainLike() throws Exception { try (QueryServer queryServer = Configs.newDefault(QueryServer.class)) { queryServer.run(); } }