@Test
public void runInTransaction() {

  when(datastore.runInTransaction(any())).then(a ->
      a.<TransactionCallable<String>>getArgument(0)
          .run(transaction));
  var foobar = instrumentedDatastore.runInTransaction(tx -> {
    testReaderWriter(tx, transaction);
    return "foobar";
  });
  verify(datastore).runInTransaction(any());
  verifyNoMoreInteractions(datastore);
  assertThat(foobar, is("foobar"));
}