@Test
public void testMultipleMutationsAreAdapted() throws IOException {

  byte[] rowKey = dataHelper.randomData("rk-1");
  RowMutations mutations = new RowMutations(rowKey);
  byte[] family1 = dataHelper.randomData("cf1");
  byte[] qualifier1 = dataHelper.randomData("qualifier1");
  byte[] value1 = dataHelper.randomData("value1");
  byte[] family2 = dataHelper.randomData("cf2");
  byte[] qualifier2 = dataHelper.randomData("qualifier2");
  byte[] value2 = dataHelper.randomData("value2");
  mutations.add(new Put(rowKey).addColumn(family1, qualifier1, value1));
  mutations.add(new Put(rowKey).addColumn(family2, qualifier2, value2));
  com.google.cloud.bigtable.data.v2.models.Mutation mutation =
      com.google.cloud.bigtable.data.v2.models.Mutation.create();
  // Adapt the RowMutations to a Mutation:
  adapter.adapt(mutations, mutation);
  MutateRowRequest result = toMutateRowRequest(rowKey, mutation);
  Assert.assertArrayEquals(rowKey, result.getRowKey().toByteArray());
  Mockito.verify(mutationAdapter, times(2))
      .adapt(any(org.apache.hadoop.hbase.client.Mutation.class), eq(mutation));
}