### Question:
NewerTimestampFilter extends FilterBase { @Override public ReturnCode filterKeyValue(Cell ignored) { return ignored.getTimestamp() > timestamp ? ReturnCode.SKIP : ReturnCode.INCLUDE; } NewerTimestampFilter(long timestamp); @Override ReturnCode filterKeyValue(Cell ignored);  }### Answer:
@Test public void testOnlyAllowsOlderTimestamps() { long ts = 100; NewerTimestampFilter filter = new NewerTimestampFilter(ts); KeyValue kv = new KeyValue(row, fam, qual, ts, val); assertEquals("Didn't accept kv with matching ts", ReturnCode.INCLUDE, filter.filterKeyValue(kv)); kv = new KeyValue(row, fam, qual, ts + 1, val); assertEquals("Didn't skip kv with greater ts", ReturnCode.SKIP, filter.filterKeyValue(kv)); kv = new KeyValue(row, fam, qual, ts - 1, val); assertEquals("Didn't accept kv with lower ts", ReturnCode.INCLUDE, filter.filterKeyValue(kv)); }