@Test
  public void testJettyThreadPoolCalculation() throws Exception {
    Server server = new Server();
    AmbariServer ambariServer = new AmbariServer();

    // 12 acceptors (48 core machine) with a configured pool size of 25
    server = ambariServer.configureJettyThreadPool(12, "mock-pool", 25);
    Assert.assertEquals(44, ((QueuedThreadPool) server.getThreadPool()).getMaxThreads());

    // 2 acceptors (8 core machine) with a configured pool size of 25
    server = ambariServer.configureJettyThreadPool(2, "mock-pool", 25);
    Assert.assertEquals(25, ((QueuedThreadPool) server.getThreadPool()).getMaxThreads());

    // 16 acceptors (64 core machine) with a configured pool size of 35
    server = ambariServer.configureJettyThreadPool(16, "mock-pool", 35);
    Assert.assertEquals(52, ((QueuedThreadPool) server.getThreadPool()).getMaxThreads());

  }
Tests that Jetty pools are configured with the correct number of
Acceptor/Selector threads.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java