BigtableConnection extends AbstractBigtableConnection { @Override public List<HRegionInfo> getAllRegionInfos(TableName tableName) throws IOException { ImmutableList.Builder<HRegionInfo> regionInfos = ImmutableList.builder(); for (HRegionLocation location : getRegionLocator(tableName).getAllRegionLocations()) { regionInfos.add(location.getRegionInfo()); } return regionInfos.build(); } BigtableConnection(Configuration conf);   BigtableConnection(Configuration conf, boolean managed, ExecutorService pool, User user); @Override Admin getAdmin(); @Override Table getTable(TableName tableName, ExecutorService ignored); @Override List<HRegionInfo> getAllRegionInfos(TableName tableName);  }
@Test public void testAllRegions() throws IOException, InterruptedException { List<HRegionInfo> regionInfoList = connection.getAllRegionInfos(TABLE_NAME); SampleRowKeysRequest request = fakeDataService.popLastRequest(); assertEquals(FULL_TABLE_NAME, request.getTableName()); assertEquals("", Bytes.toString(regionInfoList.get(0).getStartKey())); assertEquals("rowKey", Bytes.toString(regionInfoList.get(0).getEndKey())); }