@Test
  public void testGetScanner_WithNoFamilies() throws IOException {
    byte[] row1 = Bytes.toBytes("row1");
    byte[] fam1 = Bytes.toBytes("fam1");
    byte[] fam2 = Bytes.toBytes("fam2");
    byte[] fam3 = Bytes.toBytes("fam3");
    byte[] fam4 = Bytes.toBytes("fam4");

    byte[][] families = { fam1, fam2, fam3, fam4 };

    // Setting up region
    this.region = initHRegion(tableName, method, CONF, families);
    // Putting data in Region
    Put put = new Put(row1);
    put.addColumn(fam1, null, null);
    put.addColumn(fam2, null, null);
    put.addColumn(fam3, null, null);
    put.addColumn(fam4, null, null);
    region.put(put);

    Scan scan = null;

    // Testing to see how many scanners that is produced by getScanner, starting with known number,
    // 2 - current = 1
    scan = new Scan();
    scan.addFamily(fam2);
    scan.addFamily(fam4);
    try (RegionScannerImpl is = region.getScanner(scan)) {
      assertEquals(1, is.storeHeap.getHeap().size());
    }

    scan = new Scan();
    try (RegionScannerImpl is = region.getScanner(scan)) {
      assertEquals(families.length - 1, is.storeHeap.getHeap().size());
    }
  }
Tests that there is server-side filtering for invalid timestamp upper bound. Note that the
timestamp lower bound is automatically handled for us by the TTL field.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java