| 209 | } |
| 210 | |
| 211 | @Test |
| 212 | public void getRegionCachedAfterStopKey() throws Exception { |
| 213 | final RegionInfo keyed_region = new RegionInfo(TABLE, region.name(), |
| 214 | "lll".getBytes(CHARSET)); |
| 215 | regions_cache.put(region.name(), keyed_region); |
| 216 | final Object obj = Whitebox.invokeMethod(client, "getRegion", TABLE, KEY); |
| 217 | assertNotNull(obj); |
| 218 | final RegionInfo info = (RegionInfo)obj; |
| 219 | assertArrayEquals(TABLE, info.table()); |
| 220 | assertArrayEquals("lll".getBytes(CHARSET), info.stopKey()); |
| 221 | assertArrayEquals("table,,1234567890".getBytes(CHARSET), info.name()); |
| 222 | } |
| 223 | |
| 224 | @Test |
| 225 | public void getRegionCachedSameStopKey() throws Exception { |