public synchronized void clear() {
    Collection<Account> allAccounts = idToAccountMap.values();
    idToAccountMap.clear();
    nameToAccountMap.clear();
    if (notifyConsumers) {
      for (Consumer<Collection<Account>> accountUpdateConsumer : accountUpdateConsumers) {
        accountUpdateConsumer.accept(allAccounts);
      }
    }
  }
Clears all the accounts in this {@code AccountService}.
ambry-test-utils/src/main/java/com/github/ambry/account/InMemAccountService.java