@Test
public void testStartAndRollbackFailure() throws TransactionFailureException, InterruptedException {

  ds1.failStartTxOnce = InduceFailure.ThrowException;
  TransactionContext context = newTransactionContext(ds1, ds2);
  // start transaction
  try {
    context.start();
    Assert.fail("start failed - exception should be thrown");
  } catch (TransactionFailureException e) {
    Assert.assertEquals("start failure", e.getCause().getMessage());
  }
  // verify both are not rolled back and tx is aborted
  Assert.assertTrue(ds1.started);
  Assert.assertFalse(ds2.started);
  Assert.assertFalse(ds1.checked);
  Assert.assertFalse(ds2.checked);
  Assert.assertFalse(ds1.committed);
  Assert.assertFalse(ds2.committed);
  Assert.assertFalse(ds1.postCommitted);
  Assert.assertFalse(ds2.postCommitted);
  Assert.assertFalse(ds1.rolledBack);
  Assert.assertFalse(ds2.rolledBack);
  Assert.assertEquals(txClient.state, DummyTxClient.CommitState.Aborted);
}