@Override
    public Server build(Environment environment) {
        printBanner(environment.getName());
        final ThreadPool threadPool = createThreadPool(environment.metrics());
        final Server server = buildServer(environment.lifecycle(), threadPool);
        final Handler applicationHandler = createAppServlet(server,
                                                            environment.jersey(),
                                                            environment.getObjectMapper(),
                                                            environment.getValidator(),
                                                            environment.getApplicationContext(),
                                                            environment.getJerseyServletContainer(),
                                                            environment.metrics());


        final Handler adminHandler = createAdminServlet(server,
                                                        environment.getAdminContext(),
                                                        environment.metrics(),
                                                        environment.healthChecks(),
                                                        environment.admin());
        final RoutingHandler routingHandler = buildRoutingHandler(environment.metrics(),
                                                                  server,
                                                                  applicationHandler,
                                                                  adminHandler);
        final Handler gzipHandler = buildGzipHandler(routingHandler);
        server.setHandler(addStatsHandler(addRequestLog(server, gzipHandler, environment.getName())));
        return server;
    }
@Test
    void testDeserializeWithoutJsonAutoDetect() throws ConfigurationException, IOException {
        final ObjectMapper objectMapper = Jackson.newObjectMapper()
            .setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);

        assertThat(new YamlConfigurationFactory<>(
                DefaultServerFactory.class,
                BaseValidator.newValidator(),
                objectMapper,
                "dw"
                ).build(new ResourceConfigurationSourceProvider(), "yaml/server.yml")
                .getMaxThreads())
            .isEqualTo(101);
    }