@Test
  public void ambryQuotaManagerUpdateNotificationTest() throws Exception {
    VerifiableProperties verifiableProperties = new VerifiableProperties(new Properties());
    MetricRegistry metricRegistry = new MetricRegistry();

    QuotaConfig quotaConfig = new QuotaConfig(verifiableProperties);
    QuotaRecommendationMergePolicy quotaRecommendationMergePolicy =
        new SimpleQuotaRecommendationMergePolicy(quotaConfig);
    AccountServiceForConsumerTest accountService =
        new AccountServiceForConsumerTest(new AccountServiceConfig(verifiableProperties),
            new AccountServiceMetrics(metricRegistry), null);
    AmbryQuotaManager ambryQuotaManager =
        new AmbryQuotaManager(quotaConfig, quotaRecommendationMergePolicy, accountService, null,
            new QuotaMetrics(metricRegistry), QuotaTestUtils.getDefaultRouterConfig());
    AmbryCUQuotaSource quotaSource = (AmbryCUQuotaSource) getQuotaSourceMember(ambryQuotaManager);
    assertTrue("updated accounts should be empty", quotaSource.getAllQuota().isEmpty());

    Set<Short> accountIdSet = new HashSet<>();
    accountIdSet.add((short) 1);
    accountIdSet.add((short) 2);
    Map<Short, Account> idToRefAccountMap = new HashMap<>();
    AccountTestUtils.generateRefAccounts(idToRefAccountMap, new HashMap<>(), accountIdSet, 2, 3);
    accountService.notifyAccountUpdateConsumers(idToRefAccountMap.values());
    assertEquals("Invalid size of updated accounts", quotaSource.getAllQuota().size(), 2);
  }
Test that notification for account updates make it all the way to the QuotaSource.
ambry-quota/src/test/java/com/github/ambry/quota/AmbryQuotaManagerUpdateNotificationTest.java