@Before
  public void setup() throws Exception {
    injector = Guice.createInjector(Modules.override(
        new InMemoryDefaultTestModule()).with(new MockModule()));

    injector.getInstance(GuiceJpaInitializer.class);
    injector.injectMembers(this);

    StackId stackId = new StackId("HDP-0.1");
    helper.createStack(stackId);

    clusters.addCluster(CLUSTER_NAME, stackId);

    cluster = clusters.getCluster(CLUSTER_NAME);
    helper.getOrCreateRepositoryVersion(stackId, stackId.getStackVersion());

    // install HDFS
    installService("HDFS");

    writerStoppedSignal = new CountDownLatch(NUMBER_OF_THREADS);
    readerStoppedSignal = new CountDownLatch(NUMBER_OF_THREADS);
  }
Tests AMBARI-9738 which produced a deadlock during read and writes between
{@link ClustersImpl} and {@link ClusterImpl}.
ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClustersDeadlockTest.java