@Test
  public void testInit() throws Exception {
    AmbryQuotaManager ambryQuotaManager = buildAmbryQuotaManagerWithAmbryCUEnforcer();
    ambryQuotaManager.init();
    // 1. test that init is called for quota enforcers.
    Assert.assertEquals(1, testAmbryCUQuotaEnforcer.initCallCount);

    // 2. test that if init is called again, quota enforcer init is not called again.
    ambryQuotaManager.init();
    Assert.assertEquals(1, testAmbryCUQuotaEnforcer.initCallCount);

    // 3. test that is a quota enforcer init throws exception, quota manager init also throws exception.
    ambryQuotaManager.shutdown();
    testAmbryCUQuotaEnforcer.resetDefaults();
    testAmbryCUQuotaEnforcer.throwException = true;
    try {
      ambryQuotaManager.init();
      Assert.fail("init should throw an exception.");
    } catch (Exception ignored) {
    }
    Assert.assertEquals(1, testAmbryCUQuotaEnforcer.initCallCount);

    // 4. test that if quota manager init threw exception, the initialization wasn't done.
    testAmbryCUQuotaEnforcer.throwException = false;
    ambryQuotaManager.init();
    Assert.assertEquals(2, testAmbryCUQuotaEnforcer.initCallCount);
  }
Running for both {@link AmbryQuotaManager} as well as {@link AtomicAmbryQuotaManager}.
@return an array container a flag that is {@code true} for {@link AtomicAmbryQuotaManager} and {@code false} for
{@link AmbryQuotaManager}.
ambry-quota/src/test/java/com/github/ambry/quota/AmbryQuotaManagerTest.java