@Test
public void pageFilterIsAppliedToReadRowsRequest() throws IOException {

  final String TABLE_ID = "tableId";
  final RequestContext requestContext =
      RequestContext.create("ProjectId", "InstanceId", "AppProfile");
  ReadHooks hooks = new DefaultReadHooks();
  FilterAdapterContext context = new FilterAdapterContext(new Scan(), hooks);
  PageFilter pageFilter = new PageFilter(20);
  Filters.Filter adaptedFilter = pageFilterAdapter.adapt(context, pageFilter);
  Assert.assertNull("PageFilterAdapter should not return a Filters.Filter.", adaptedFilter);
  Query query = Query.create(TABLE_ID).limit(100);
  hooks.applyPreSendHook(query);
  Assert.assertEquals(20, query.toProto(requestContext).getRowsLimit());
}