public Timestamp insert(PartitionMetadata row) {
    final TransactionResult<Void> transactionResult =
        runInTransaction(transaction -> transaction.insert(row), "InsertsPartitionMetadata");
    return transactionResult.getCommitTimestamp();
  }
@Test
  public void testInsert() {
    when(databaseClient.readWriteTransaction(anyObject())).thenReturn(readWriteTransactionRunner);
    when(databaseClient.readWriteTransaction()).thenReturn(readWriteTransactionRunner);
    when(readWriteTransactionRunner.run(any())).thenReturn(null);
    when(readWriteTransactionRunner.getCommitTimestamp())
        .thenReturn(Timestamp.ofTimeMicroseconds(1L));
    Timestamp commitTimestamp = partitionMetadataDao.insert(ROW);
    verify(databaseClient, times(1)).readWriteTransaction(anyObject());
    verify(readWriteTransactionRunner, times(1)).run(any());
    verify(readWriteTransactionRunner, times(1)).getCommitTimestamp();
    assertEquals(Timestamp.ofTimeMicroseconds(1L), commitTimestamp);
  }