@Test
  public void testTheMaximalRule() throws IOException {
    KeyValue kv1 = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("fam"), Bytes.toBytes("a"), 1,
      Bytes.toBytes("value"));
    MockFilter filter1 = new MockFilter(ReturnCode.INCLUDE);
    MockFilter filter2 = new MockFilter(ReturnCode.INCLUDE_AND_NEXT_COL);
    MockFilter filter3 = new MockFilter(ReturnCode.INCLUDE_AND_SEEK_NEXT_ROW);
    MockFilter filter4 = new MockFilter(ReturnCode.NEXT_COL);
    MockFilter filter5 = new MockFilter(ReturnCode.SKIP);
    MockFilter filter6 = new HintingMockFilter(ReturnCode.SEEK_NEXT_USING_HINT);
    MockFilter filter7 = new MockFilter(ReturnCode.NEXT_ROW);

    FilterList filterList = new FilterList(Operator.MUST_PASS_ALL, filter1, filter2);
    assertEquals(ReturnCode.INCLUDE_AND_NEXT_COL, filterList.filterCell(kv1));

    filterList = new FilterList(Operator.MUST_PASS_ALL, filter2, filter3);
    assertEquals(ReturnCode.INCLUDE_AND_SEEK_NEXT_ROW, filterList.filterCell(kv1));

    filterList = new FilterList(Operator.MUST_PASS_ALL, filter4, filter5, filter6);
    assertEquals(ReturnCode.SEEK_NEXT_USING_HINT, filterList.filterCell(kv1));

    filterList = new FilterList(Operator.MUST_PASS_ALL, filter4, filter6);
    assertEquals(ReturnCode.SEEK_NEXT_USING_HINT, filterList.filterCell(kv1));

    filterList = new FilterList(Operator.MUST_PASS_ALL, filter3, filter1);
    assertEquals(ReturnCode.INCLUDE_AND_SEEK_NEXT_ROW, filterList.filterCell(kv1));

    filterList = new FilterList(Operator.MUST_PASS_ALL, filter3, filter2, filter1, filter5);
    assertEquals(ReturnCode.NEXT_ROW, filterList.filterCell(kv1));

    filterList = new FilterList(Operator.MUST_PASS_ALL, filter2,
      new FilterList(Operator.MUST_PASS_ALL, filter3, filter4));
    assertEquals(ReturnCode.NEXT_ROW, filterList.filterCell(kv1));

    filterList = new FilterList(Operator.MUST_PASS_ALL, filter3, filter7);
    assertEquals(ReturnCode.NEXT_ROW, filterList.filterCell(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