private Region mockRegionWithHFileLinks(Collection<Long> storeSizes,
    Collection<Long> hfileSizes) {
    final Region r = mock(Region.class);
    final RegionInfo info = mock(RegionInfo.class);
    when(r.getRegionInfo()).thenReturn(info);
    List<Store> stores = new ArrayList<>();
    when(r.getStores()).thenReturn((List) stores);
    assertEquals("Logic error, storeSizes and linkSizes must be equal in size", storeSizes.size(),
      hfileSizes.size());
    Iterator<Long> storeSizeIter = storeSizes.iterator();
    Iterator<Long> hfileSizeIter = hfileSizes.iterator();
    while (storeSizeIter.hasNext() && hfileSizeIter.hasNext()) {
      final long storeSize = storeSizeIter.next();
      final long hfileSize = hfileSizeIter.next();
      final Store s = mock(Store.class);
      stores.add(s);
      when(s.getStorefilesSize()).thenReturn(storeSize);
      when(s.getHFilesSize()).thenReturn(hfileSize);
    }
    return r;
  }
Creates a region with a number of Stores equal to the length of {@code storeSizes}. Each
{@link Store} will have a reported size corresponding to the element in {@code storeSizes}.
@param storeSizes A list of sizes for each Store.
@return A mocked Region.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestFileSystemUtilizationChore.java