private static String generateRegionKey(RegionInfo regionInfo) {
    // Using Base64 encoding for byte arrays to ensure uniqueness and readability
    String startKey = Base64.getEncoder().encodeToString(regionInfo.getStartKey());
    String endKey = Base64.getEncoder().encodeToString(regionInfo.getEndKey());

    return regionInfo.getTable().getNameAsString() + ":" + startKey + ":" + endKey;
  }
Generates a unique key for a region based on its start and end keys. This method ensures that
regions with identical start and end keys have the same key.
@param regionInfo The RegionInfo object.
@return A string representing the unique key of the region.
hbase-balancer/src/test/java/org/apache/hadoop/hbase/master/balancer/CandidateGeneratorTestUtil.java