public Region findRegionByKey(final byte[] key) {
        Requires.requireNonNull(key, "key");
        final StampedLock stampedLock = this.stampedLock;
        final long stamp = stampedLock.readLock();
        try {
            return findRegionByKeyWithoutLock(key);
        } finally {
            stampedLock.unlockRead(stamp);
        }
    }
@Test
    public void findRegionByKeyTest() {
        // case-1
        {
            RegionRouteTable table = new RegionRouteTable();
            Region region = makeRegion(-1, null, null);
            table.addOrUpdateRegion(region);
            Region found = table.findRegionByKey(new byte[0]);
            assertEquals(region, found);
        }
        // case-2
        {
            RegionRouteTable table = new RegionRouteTable();
            Region r1 = makeRegion(1, null, KeyValueTool.makeKey("c"));
            Region r2 = makeRegion(2, KeyValueTool.makeKey("c"), KeyValueTool.makeKey("e"));
            Region r3 = makeRegion(3, KeyValueTool.makeKey("e"), null);
            table.addOrUpdateRegion(r1);
            table.addOrUpdateRegion(r2);
            table.addOrUpdateRegion(r3);
            Region found = table.findRegionByKey(KeyValueTool.makeKey("abs"));
            assertEquals(r1.getId(), found.getId());
            found = table.findRegionByKey(KeyValueTool.makeKey("cde"));
            assertEquals(r2.getId(), found.getId());
            found = table.findRegionByKey(KeyValueTool.makeKey("efg"));
            assertEquals(r3.getId(), found.getId());
        }
    }