private RegionMetrics mockRegion(String regionName, int fileSizeMb, int memStoreSize) {
    RegionMetrics region = Mockito.mock(RegionMetrics.class);
    when(region.getRegionName()).thenReturn(Bytes.toBytes(regionName));
    when(region.getNameAsString()).thenReturn(regionName);
    when(region.getStoreFileSize()).thenReturn(new Size(fileSizeMb, Size.Unit.MEGABYTE));
    when(region.getMemStoreSize()).thenReturn(new Size(memStoreSize, Size.Unit.MEGABYTE));
    return region;
  }
Creates mock of region with given name and size.
@param fileSizeMb   number of megabytes occupied by region in file store in megabytes
@param memStoreSize number of megabytes occupied by region in memstore in megabytes
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRegionSizeCalculator.java