@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
  ambariServer.configureJettyThreadPool(server, 12, "mock-pool", 25);
  Assert.assertEquals(44, ((QueuedThreadPool) server.getThreadPool()).getMaxThreads());
  // 2 acceptors (8 core machine) with a configured pool size of 25
  ambariServer.configureJettyThreadPool(server, 2, "mock-pool", 25);
  Assert.assertEquals(25, ((QueuedThreadPool) server.getThreadPool()).getMaxThreads());
  // 16 acceptors (64 core machine) with a configured pool size of 35
  ambariServer.configureJettyThreadPool(server, 16, "mock-pool", 35);
  Assert.assertEquals(52, ((QueuedThreadPool) server.getThreadPool()).getMaxThreads());
}