@Test
  public void testReversedFilterListWithMockSeekHintFilter() throws IOException {
    KeyValue kv1 = new KeyValue(Bytes.toBytes("row1"), Bytes.toBytes("fam"), Bytes.toBytes("a"), 1,
      Bytes.toBytes("value"));
    KeyValue kv2 = new KeyValue(Bytes.toBytes("row2"), Bytes.toBytes("fam"), Bytes.toBytes("a"), 1,
      Bytes.toBytes("value"));
    KeyValue kv3 = new KeyValue(Bytes.toBytes("row3"), Bytes.toBytes("fam"), Bytes.toBytes("a"), 1,
      Bytes.toBytes("value"));
    Filter filter1 = new MockSeekHintFilter(kv1);
    filter1.setReversed(true);
    Filter filter2 = new MockSeekHintFilter(kv2);
    filter2.setReversed(true);
    Filter filter3 = new MockSeekHintFilter(kv3);
    filter3.setReversed(true);

    FilterList filterList = new FilterList(Operator.MUST_PASS_ONE);
    filterList.setReversed(true);
    filterList.addFilter(filter1);
    filterList.addFilter(filter2);
    filterList.addFilter(filter3);

    Assert.assertEquals(ReturnCode.SEEK_NEXT_USING_HINT, filterList.filterCell(kv1));
    Assert.assertEquals(kv3, filterList.getNextCellHint(kv1));

    filterList = new FilterList(Operator.MUST_PASS_ALL);
    filterList.setReversed(true);
    filterList.addFilter(filter1);
    filterList.addFilter(filter2);
    filterList.addFilter(filter3);

    Assert.assertEquals(ReturnCode.SEEK_NEXT_USING_HINT, filterList.filterCell(kv1));
    Assert.assertEquals(kv1, filterList.getNextCellHint(kv1));
  }
Tests the behavior of transform() in a hierarchical filter. transform() only applies after a
filterCell() whose return-code includes the KeyValue. Lazy evaluation of AND
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java