KeyOnlyFilterAdapter extends TypedFilterAdapterBase<KeyOnlyFilter> { @Override public Filters.Filter adapt(FilterAdapterContext context, KeyOnlyFilter filter) throws IOException { return KEY_ONLY_FILTER; }  @Override Filters.Filter adapt(FilterAdapterContext context, KeyOnlyFilter filter); @Override FilterSupportStatus isFilterSupported(FilterAdapterContext context, KeyOnlyFilter filter);  }
@Test public void stripValuesIsApplied() throws IOException { KeyOnlyFilter filter = new KeyOnlyFilter(); Filters.Filter expectedFilter = filterAdapter.adapt(emptyScanContext, filter); Chain chain = expectedFilter.toProto().getChain(); Assert.assertTrue( chain.getFilters(0).getStripValueTransformer() || chain.getFilters(1).getStripValueTransformer()); Filters.Filter filters = filterAdapter.adapt(emptyScanContext, filter); Filters f = Filters.FILTERS; Assert.assertEquals( filters.toProto(), f.chain().filter(f.limit().cellsPerColumn(1)).filter(f.value().strip()).toProto()); }