@Test
public void testIndexIsNarrowed() {

  PrefixFilterAdapter adapter = new PrefixFilterAdapter();
  String prefix = "Foobar";
  PrefixFilter filter = new PrefixFilter(Bytes.toBytes(prefix));
  RangeSet<RowKeyWrapper> hint = adapter.getIndexScanHint(filter);
  ImmutableRangeSet<RowKeyWrapper> expected =
      ImmutableRangeSet.<RowKeyWrapper>builder()
          .add(
              Range.closedOpen(
                  new RowKeyWrapper(ByteString.copyFromUtf8("Foobar")),
                  new RowKeyWrapper(ByteString.copyFromUtf8("Foobas"))))
          .build();
  Assert.assertEquals(expected, hint);
}