private Injector createMockInjector(final AmbariMetaInfo mockAmbariMetainfo,
                                      final DBAccessor mockDBDbAccessor,
                                      final OsFamily mockOSFamily,
                                      final EntityManager mockEntityManager,
                                      final Clusters mockClusters,
                                      final Configuration mockConfiguration) {
    return Guice.createInjector(new AbstractModule() {
      @Override
      protected void configure() {
        PartialNiceMockBinder.newBuilder().addClustersBinding().addLdapBindings().build().configure(binder());

        bind(StackManagerFactory.class).toInstance(createNiceMock(StackManagerFactory.class));
        bind(MpackManagerFactory.class).toInstance(createNiceMock(MpackManagerFactory.class));
        bind(AmbariMetaInfo.class).toInstance(mockAmbariMetainfo);
        bind(DBAccessor.class).toInstance(mockDBDbAccessor);
        bind(OsFamily.class).toInstance(mockOSFamily);
        bind(EntityManager.class).toInstance(mockEntityManager);
        bind(Clusters.class).toInstance(mockClusters);
        bind(Configuration.class).toInstance(mockConfiguration);
      }
    });
  }
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