GetAdapter implements ReadOperationAdapter<Get> { public Filters.Filter buildFilter(Get operation) { Scan operationAsScan = new Scan(addKeyOnlyFilter(operation)); scanAdapter.throwIfUnsupportedScan(operationAsScan); return scanAdapter.buildFilter(operationAsScan, new DefaultReadHooks()); } GetAdapter(ScanAdapter scanAdapter); static Get setCheckExistenceOnly(Get get); @Override void adapt(Get operation, ReadHooks readHooks, Query query); Filters.Filter buildFilter(Get operation);  }
@Test public void testBuildFilter() throws IOException { Get get = makeValidGet(dataHelper.randomData(PREFIX_DATA)); get.setFilter(new FamilyFilter(CompareFilter.CompareOp.EQUAL, new RegexStringComparator("a"))); get.setMaxVersions(5); Filters.Filter actualFilter = getAdapter.buildFilter(get); Assert.assertEquals( FILTERS .chain() .filter(FILTERS.limit().cellsPerColumn(5)) .filter(FILTERS.family().regex("a")) .toProto(), actualFilter.toProto()); }