private boolean setAndNotify(String path, T record) {
    HelixStoreOperator.StoreOperationType operationType =
        pathToRecords.get(path) == null ? HelixStoreOperator.StoreOperationType.CREATE
            : HelixStoreOperator.StoreOperationType.WRITE;
    if (!shouldRemoveRecordBeforeNotify) {
      pathToRecords.put(path, record);
      Stat stat = pathToStats.get(path);
      long currentTime = System.currentTimeMillis();
      if (stat == null) {
        stat = new Stat();
        stat.setCtime(currentTime);
        stat.setMtime(currentTime);
        stat.setVersion(0);
        pathToStats.put(path, stat);
      } else {
        stat.setMtime(currentTime);
        stat.setVersion(stat.getVersion() + 1);
      }
    }
    notifyListeners(path, operationType);
    return true;
  }
Sets a record in store and notify the corresponding listeners.
@param path The path to set the record.
@param record The record to set.
@return {@code true}.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/MockHelixPropertyStore.java