@Test
  public void testReversedFilterListWithOR() throws IOException {
    byte[] r22 = Bytes.toBytes("Row22");
    byte[] r2 = Bytes.toBytes("Row2");
    byte[] r1 = Bytes.toBytes("Row1");

    FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ONE);
    filterList.setReversed(true);
    PrefixFilter prefixFilter = new PrefixFilter(r2);
    prefixFilter.setReversed(true);
    filterList.addFilter(prefixFilter);
    filterList.filterRowKey(KeyValueUtil.createFirstOnRow(r22));
    assertEquals(ReturnCode.INCLUDE, filterList.filterCell(new KeyValue(r22, r22, r22)));
    assertEquals(ReturnCode.INCLUDE, filterList.filterCell(new KeyValue(r2, r2, r2)));

    filterList.reset();
    filterList.filterRowKey(KeyValueUtil.createFirstOnRow(r1));
    assertEquals(ReturnCode.SKIP, filterList.filterCell(new KeyValue(r1, r1, r1)));

    filterList = new FilterList(FilterList.Operator.MUST_PASS_ONE);
    filterList.setReversed(true);
    AlwaysNextColFilter alwaysNextColFilter = new AlwaysNextColFilter();
    alwaysNextColFilter.setReversed(true);
    prefixFilter = new PrefixFilter(r2);
    prefixFilter.setReversed(true);
    filterList.addFilter(alwaysNextColFilter);
    filterList.addFilter(prefixFilter);
    filterList.filterRowKey(KeyValueUtil.createFirstOnRow(r22));
    assertEquals(ReturnCode.INCLUDE, filterList.filterCell(new KeyValue(r22, r22, r22)));
    assertEquals(ReturnCode.INCLUDE, filterList.filterCell(new KeyValue(r2, r2, r2)));

    filterList.reset();
    filterList.filterRowKey(KeyValueUtil.createFirstOnRow(r1));
    assertEquals(ReturnCode.NEXT_COL, filterList.filterCell(new KeyValue(r1, r1, r1)));
  }
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