@Test
public void testSendOutstanding() throws Exception {

  Duration autoFlushTime = Duration.ofSeconds(30);
  settingsBuilder
      .stubSettings()
      .bulkReadRowsSettings()
      .setBatchingSettings(
          BatchingSettings.newBuilder()
              .setDelayThreshold(autoFlushTime)
              .setElementCountThreshold(100L)
              .setRequestByteThreshold(10L * 1024L)
              .build());
  dataClient = BigtableDataClient.create(settingsBuilder.build());
  BulkReadWrapper bulkReadWrapper = new BulkReadVeneerApi(dataClient, TABLE_ID);
  List<ApiFuture<Result>> results = new ArrayList<>();
  results.add(bulkReadWrapper.add(ByteString.copyFromUtf8("one"), null));
  bulkReadWrapper.sendOutstanding();
  results.add(bulkReadWrapper.add(ByteString.copyFromUtf8("two"), null));
  bulkReadWrapper.sendOutstanding();
  results.add(bulkReadWrapper.add(ByteString.copyFromUtf8("three"), null));
  bulkReadWrapper.sendOutstanding();
  results.add(bulkReadWrapper.add(ByteString.copyFromUtf8("four"), null));
  bulkReadWrapper.sendOutstanding();
  results.add(bulkReadWrapper.add(ByteString.copyFromUtf8("five"), null));
  bulkReadWrapper.sendOutstanding();
  ApiFutures.allAsList(results).get();
  assertEquals(5, fakeDataService.getReadRowsBatchCount());
}