FirstKeyOnlyFilterAdapter extends TypedFilterAdapterBase<FirstKeyOnlyFilter> { @Override public Filters.Filter adapt(FilterAdapterContext context, FirstKeyOnlyFilter filter) { return LIMIT_ONE; }  @Override Filters.Filter adapt(FilterAdapterContext context, FirstKeyOnlyFilter filter); @Override FilterSupportStatus isFilterSupported(
      FilterAdapterContext context, FirstKeyOnlyFilter filter);  }
@Test public void onlyTheFirstKeyFromEachRowIsEmitted() throws IOException { Filters.Filter adaptedFilter = adapter.adapt(new FilterAdapterContext(new Scan(), null), new FirstKeyOnlyFilter()); Assert.assertEquals(FILTERS.limit().cellsPerRow(1).toProto(), adaptedFilter.toProto()); }