@Test
public void testBulkMutation() throws IOException {

  BigtableOptions options =
      BigtableOptions.builder()
          .setProjectId(TEST_PROJECT_ID)
          .setInstanceId(TEST_INSTANCE_ID)
          .setCredentialOptions(CredentialOptions.nullCredential())
          .setUserAgent("Test-user-agent")
          .build();
  dataSettings = BigtableVeneerSettingsFactory.createBigtableDataSettings(options);
  BulkOptions bulkOptions = options.getBulkOptions();
  BatchingSettings batchingSettings =
      dataSettings.getStubSettings().bulkMutateRowsSettings().getBatchingSettings();
  long outstandingElementCount =
      bulkOptions.getMaxInflightRpcs() * bulkOptions.getBulkMaxRowKeyCount();
  assertTrue(batchingSettings.getIsEnabled());
  assertEquals(
      bulkOptions.getBulkMaxRequestSize(),
      batchingSettings.getRequestByteThreshold().longValue());
  assertEquals(
      bulkOptions.getBulkMaxRowKeyCount(),
      batchingSettings.getElementCountThreshold().longValue());
  assertEquals(
      bulkOptions.getMaxMemory(),
      batchingSettings.getFlowControlSettings().getMaxOutstandingRequestBytes().longValue());
  assertEquals(
      outstandingElementCount,
      batchingSettings.getFlowControlSettings().getMaxOutstandingElementCount().longValue());
}