@Test
  public void testDataInMemoryWithoutWAL() throws IOException {
    FileSystem fs = FileSystem.get(CONF);
    Path rootDir = new Path(dir + "testDataInMemoryWithoutWAL");
    FSHLog hLog = new FSHLog(fs, rootDir, "testDataInMemoryWithoutWAL", CONF);
    hLog.init();
    // This chunk creation is done throughout the code base. Do we want to move it into core?
    // It is missing from this test. W/o it we NPE.
    region = initHRegion(tableName, null, null, CONF, false, Durability.SYNC_WAL, hLog,
      COLUMN_FAMILY_BYTES);

    Cell originalCell = ExtendedCellBuilderFactory.create(CellBuilderType.DEEP_COPY).setRow(row)
      .setFamily(COLUMN_FAMILY_BYTES).setQualifier(qual1)
      .setTimestamp(EnvironmentEdgeManager.currentTime()).setType(KeyValue.Type.Put.getCode())
      .setValue(value1).build();
    final long originalSize = originalCell.getSerializedSize();

    Cell addCell = ExtendedCellBuilderFactory.create(CellBuilderType.DEEP_COPY).setRow(row)
      .setFamily(COLUMN_FAMILY_BYTES).setQualifier(qual1)
      .setTimestamp(EnvironmentEdgeManager.currentTime()).setType(KeyValue.Type.Put.getCode())
      .setValue(Bytes.toBytes("xxxxxxxxxx")).build();
    final long addSize = addCell.getSerializedSize();

    LOG.info("originalSize:" + originalSize + ", addSize:" + addSize);
    // start test. We expect that the addPut's durability will be replaced
    // by originalPut's durability.

    // case 1:
    testDataInMemoryWithoutWAL(region,
      new Put(row).add(originalCell).setDurability(Durability.SKIP_WAL),
      new Put(row).add(addCell).setDurability(Durability.SKIP_WAL), originalSize + addSize);

    // case 2:
    testDataInMemoryWithoutWAL(region,
      new Put(row).add(originalCell).setDurability(Durability.SKIP_WAL),
      new Put(row).add(addCell).setDurability(Durability.SYNC_WAL), originalSize + addSize);

    // case 3:
    testDataInMemoryWithoutWAL(region,
      new Put(row).add(originalCell).setDurability(Durability.SYNC_WAL),
      new Put(row).add(addCell).setDurability(Durability.SKIP_WAL), 0);

    // case 4:
    testDataInMemoryWithoutWAL(region,
      new Put(row).add(originalCell).setDurability(Durability.SYNC_WAL),
      new Put(row).add(addCell).setDurability(Durability.SYNC_WAL), 0);
  }
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