@Test
  public void testFilterDropping() throws Exception {
    Filter filter = new DependentColumnFilter(FAMILIES[0], QUALIFIER);
    List<Cell> accepted = new ArrayList<>();
    for (Cell val : testVals) {
      if (filter.filterCell(val) == ReturnCode.INCLUDE) {
        accepted.add(val);
      }
    }
    assertEquals("check all values accepted from filterCell", 5, accepted.size());

    filter.filterRowCells(accepted);
    assertEquals("check filterRow(List<KeyValue>) dropped cell without corresponding column entry",
      4, accepted.size());

    // start do it again with dependent column dropping on
    filter = new DependentColumnFilter(FAMILIES[1], QUALIFIER, true);
    accepted.clear();
    for (KeyValue val : testVals) {
      if (filter.filterCell(val) == ReturnCode.INCLUDE) {
        accepted.add(val);
      }
    }
    assertEquals("check the filtering column cells got dropped", 2, accepted.size());

    filter.filterRowCells(accepted);
    assertEquals("check cell retention", 2, accepted.size());
  }
Test that the filter correctly drops rows without a corresponding timestamp
hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java