MockId getUniqueId(int length) {
    MockId id;
    do {
      id = new MockId(TestUtils.getRandomString(length));
    } while (generatedKeys.contains(id));
    generatedKeys.add(id);
    return id;
  }
@param length the length of the string to use to create the {@link MockId}.
@return a {@link MockId} that is unique and has not been generated before in this run.
ambry-store/src/test/java/com/github/ambry/store/CuratedLogIndexState.java