static void generateRefAccountsForDeprecationTest(Map<Short, Account> idToRefAccountMap,
      Map<Short, Map<Short, Container>> idToRefContainerMap, Set<Short> accountIdSet, int accountCount,
      long timestamp) {
    idToRefAccountMap.clear();
    idToRefContainerMap.clear();
    for (int i = 0; i < accountCount; i++) {
      short accountId = Utils.getRandomShort(random);
      if (!accountIdSet.add(accountId)) {
        i--;
        continue;
      }
      String accountName = UUID.randomUUID().toString();
      Account.AccountStatus accountStatus =
          random.nextBoolean() ? Account.AccountStatus.ACTIVE : Account.AccountStatus.INACTIVE;
      Map<Short, Container> idToContainers = new HashMap<>();
      List<Container> containers = new ArrayList<>();
      List<ContainerBuilder> containerBuilders = AccountTestUtils.generateContainerBuilders(4, accountId);
      containerBuilders.get(0).setStatus(Container.ContainerStatus.ACTIVE);
      containerBuilders.get(1).setStatus(Container.ContainerStatus.INACTIVE);
      containerBuilders.get(2).setStatus(Container.ContainerStatus.DELETE_IN_PROGRESS);
      containerBuilders.get(2).setDeleteTriggerTime(timestamp);
      containerBuilders.get(3).setStatus(Container.ContainerStatus.DELETE_IN_PROGRESS);
      containerBuilders.get(3).setDeleteTriggerTime(timestamp + 10000);

      containers.addAll(
          containerBuilders.stream().map(containerBuilder -> containerBuilder.build()).collect(Collectors.toList()));
      idToContainers = containers.stream().collect(Collectors.toMap(Container::getId, Function.identity()));
      Account account = new AccountBuilder(accountId, accountName, accountStatus).containers(containers).build();
      assertEquals("Wrong number of generated containers for the account", 4, account.getAllContainers().size());
      idToRefAccountMap.put(accountId, account);
      idToRefContainerMap.put(accountId, idToContainers);
    }
    assertEquals("Wrong number of generated accounts", accountCount, idToRefAccountMap.size());
  }
Randomly generates a collection of {@link Account}s, which do not have the same id or name with needed container status.
@param idToRefAccountMap A map from id to {@link Account} to populate with the generated {@link Account}s.
@param idToRefContainerMap A map from name to {@link Account} to populate with the generated {@link Account}s.
@param accountIdSet A set of ids that could not be used to generate {@link Account}s.
@param accountCount The number of {@link Account}s to generate.
@param timestamp timestamp for delete trigger time.
ambry-account/src/test/java/com/github/ambry/account/HelixAccountServiceTest.java