use of com.google.bigtable.repackaged.com.google.cloud.bigtable.data.v2.models.KeyOffset in project java-bigtable-hbase by googleapis.
the class TestAbstractBigtableConnection method testRegionLocator.
@Test
public void testRegionLocator() throws IOException {
assertEquals(1, connection.getAllRegionInfos(TABLE_NAME).size());
assertEquals(regionInfo, connection.getAllRegionInfos(TABLE_NAME).get(0));
List<HRegionLocation> expectedRegionLocations = ImmutableList.of(new HRegionLocation(regionInfo, ServerName.valueOf(HOST_NAME, server.getPort(), 0)));
when(mockSampledAdapter.adaptResponse(Mockito.<List<KeyOffset>>any())).thenReturn(expectedRegionLocations);
RegionLocator regionLocator = connection.getRegionLocator(TABLE_NAME);
assertEquals(expectedRegionLocations, regionLocator.getAllRegionLocations());
}
Aggregations