@Test
  public void testFilters() throws Exception {
    final byte[] c1 = COLUMNS[1];
    ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.newBuilder(c0).setMinVersions(2)
      .setMaxVersions(1000).setTimeToLive(1).setKeepDeletedCells(KeepDeletedCells.FALSE).build();

    ColumnFamilyDescriptor cfd2 = ColumnFamilyDescriptorBuilder.newBuilder(c1).setMinVersions(2)
      .setMaxVersions(1000).setTimeToLive(1).setKeepDeletedCells(KeepDeletedCells.FALSE).build();
    List<ColumnFamilyDescriptor> cfdList = new ArrayList();
    cfdList.add(cfd);
    cfdList.add(cfd2);

    TableDescriptor htd = TableDescriptorBuilder.newBuilder(TableName.valueOf(name.getMethodName()))
      .setColumnFamilies(cfdList).build();
    HRegion region = hbu.createLocalHRegion(htd, null, null);

    // 2s in the past
    long ts = EnvironmentEdgeManager.currentTime() - 2000;
    try {

      Put p = new Put(T1, ts - 3);
      p.addColumn(c0, c0, T0);
      p.addColumn(c1, c1, T0);
      region.put(p);

      p = new Put(T1, ts - 2);
      p.addColumn(c0, c0, T1);
      p.addColumn(c1, c1, T1);
      region.put(p);

      p = new Put(T1, ts - 1);
      p.addColumn(c0, c0, T2);
      p.addColumn(c1, c1, T2);
      region.put(p);

      p = new Put(T1, ts);
      p.addColumn(c0, c0, T3);
      p.addColumn(c1, c1, T3);
      region.put(p);

      List<Long> tss = new ArrayList<>();
      tss.add(ts - 1);
      tss.add(ts - 2);

      // Sholud only get T2, versions is 2, so T1 is gone from user view.
      Get g = new Get(T1);
      g.addColumn(c1, c1);
      g.setFilter(new TimestampsFilter(tss));
      g.readAllVersions();
      Result r = region.get(g);
      checkResult(r, c1, T2);

      // Sholud only get T2, versions is 2, so T1 is gone from user view.
      g = new Get(T1);
      g.addColumn(c0, c0);
      g.setFilter(new TimestampsFilter(tss));
      g.readAllVersions();
      r = region.get(g);
      checkResult(r, c0, T2);

      // now flush/compact
      region.flush(true);
      region.compact(true);

      // After flush/compact, the result should be consistent with previous result
      g = new Get(T1);
      g.addColumn(c1, c1);
      g.setFilter(new TimestampsFilter(tss));
      g.readAllVersions();
      r = region.get(g);
      checkResult(r, c1, T2);

      // After flush/compact, the result should be consistent with previous result
      g = new Get(T1);
      g.addColumn(c0, c0);
      g.setFilter(new TimestampsFilter(tss));
      g.readAllVersions();
      r = region.get(g);
      checkResult(r, c0, T2);
    } finally {
      HBaseTestingUtil.closeRegionAndWAL(region);
    }
  }
Verify that basic filters still behave correctly with minimum versions enabled.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java