@Test
  public void testTransformCell() throws IOException {
    KeyValue kv = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("cf"), Bytes.toBytes("column1"),
      1, Bytes.toBytes("value"));

    // case MUST_PASS_ONE
    TransformFilter filter1 = new TransformFilter(ReturnCode.INCLUDE);
    TransformFilter filter2 = new TransformFilter(ReturnCode.NEXT_ROW);
    TransformFilter filter3 = new TransformFilter(ReturnCode.SEEK_NEXT_USING_HINT);
    FilterList filterList = new FilterList(Operator.MUST_PASS_ONE, filter1, filter2, filter3);
    Assert.assertEquals(ReturnCode.INCLUDE, filterList.filterCell(kv));
    Assert.assertEquals(kv, filterList.transformCell(kv));
    Assert.assertEquals(true, filter1.getTransformed());
    Assert.assertEquals(false, filter2.getTransformed());
    Assert.assertEquals(false, filter3.getTransformed());

    // case MUST_PASS_ALL
    filter1 = new TransformFilter(ReturnCode.INCLUDE);
    filter2 = new TransformFilter(ReturnCode.INCLUDE_AND_SEEK_NEXT_ROW);
    filter3 = new TransformFilter(ReturnCode.INCLUDE_AND_NEXT_COL);
    filterList = new FilterList(Operator.MUST_PASS_ALL, filter1, filter2, filter3);

    Assert.assertEquals(ReturnCode.INCLUDE_AND_SEEK_NEXT_ROW, filterList.filterCell(kv));
    Assert.assertEquals(kv, filterList.transformCell(kv));
    Assert.assertEquals(true, filter1.getTransformed());
    Assert.assertEquals(true, filter2.getTransformed());
    Assert.assertEquals(true, filter3.getTransformed());
  }
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