Source:
<code>public void testSkipFiltering() throws Exception { Filter filter = new CellSkipFilter(new MyFilter(Filter.ReturnCode.INCLUDE)); long timestamp = System.currentTimeMillis(); assertEquals(Filter.ReturnCode.INCLUDE, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp))); assertEquals(Filter.ReturnCode.INCLUDE, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp - 1))); filter = new CellSkipFilter(new MyFilter(Filter.ReturnCode.INCLUDE_AND_NEXT_COL)); assertEquals(Filter.ReturnCode.INCLUDE_AND_NEXT_COL, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp))); <START> assertEquals(Filter.ReturnCode.NEXT_COL, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp - 1))); <END> filter = new CellSkipFilter(new MyFilter(Filter.ReturnCode.SKIP)); assertEquals(Filter.ReturnCode.SKIP, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp))); assertEquals(Filter.ReturnCode.SKIP, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp - 1))); filter = new CellSkipFilter(new MyFilter(Filter.ReturnCode.NEXT_COL)); assertEquals(Filter.ReturnCode.NEXT_COL, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp))); assertEquals(Filter.ReturnCode.NEXT_COL, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp - 1))); filter = new CellSkipFilter(new MyFilter(Filter.ReturnCode.NEXT_ROW)); assertEquals(Filter.ReturnCode.NEXT_ROW, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp))); assertEquals(Filter.ReturnCode.NEXT_ROW, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp - 1))); filter = new CellSkipFilter(new MyFilter(Filter.ReturnCode.SEEK_NEXT_USING_HINT)); assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp))); assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, filter.filterKeyValue(newKeyValue("row1", "val1", timestamp - 1))); }</code><technical_language>a good idea verify passing row/column give right answer for cases</technical_language>

Target:
public void testSkipFiltering() throws Exception { long timestamp = System.currentTimeMillis(); Filter filter = new CellSkipFilter(new MyFilter(0)); assertEquals(Filter.ReturnCode.INCLUDE, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM1KEY, COL1KEY, VALUE, timestamp))); assertEquals(Filter.ReturnCode.INCLUDE_AND_NEXT_COL, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM1KEY, COL1KEY, VALUE, timestamp - 1))); assertEquals(Filter.ReturnCode.NEXT_COL, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM1KEY, COL1KEY, VALUE, timestamp - 2))); assertEquals(Filter.ReturnCode.NEXT_COL, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM1KEY, COL1KEY, VALUE, timestamp - 3))); assertEquals(Filter.ReturnCode.SKIP, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM2KEY, COL1KEY, VALUE, timestamp - 4))); filter = new CellSkipFilter(new MyFilter(2)); assertEquals(Filter.ReturnCode.SKIP, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM1KEY, COL1KEY, VALUE, timestamp))); assertEquals(Filter.ReturnCode.NEXT_COL, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM1KEY, COL1KEY, VALUE, timestamp - 1))); assertEquals(Filter.ReturnCode.NEXT_COL, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM1KEY, COL1KEY, VALUE, timestamp - 2))); assertEquals(Filter.ReturnCode.NEXT_COL, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM1KEY, COL1KEY, VALUE, timestamp - 3))); assertEquals(Filter.ReturnCode.NEXT_ROW, filter.filterKeyValue(newKeyValue(ROW1KEY, FAM1KEY, COL2KEY, VALUE, timestamp - 4))); assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, filter.filterKeyValue(newKeyValue(ROW2KEY, FAM1KEY, COL1KEY, VALUE, timestamp - 5))); }