### Question:
TLS2PCCoordinator implements TwoPCCoordinator { @Override public void beginTransaction() throws TransactionAlreadyStartedException { if (TransactionContext.getCurrentTransaction() != null) { throw new TransactionAlreadyStartedException("nested transaction is unsupported."); } UUID transactionId = UUID.randomUUID(); TwoPCParticipants participants = this.localParticipantsManager.getParticipantManager(transactionId); TransactionContext.enterTransaction(transactionId, participants); } TLS2PCCoordinator(TransactionValidator validator); @Override void beginTransaction(); @Override UUID getTransactionId(); @Override void join(UUID transactionId); @Override void leave(UUID transactionId); @Override Vote vote(UUID transactionId); @Override void commit(UUID transactionId); @Override void abort(UUID transactionId);  }### Answer:
@Test(expected = TransactionAlreadyStartedException.class) public void test_coordinator_throws_on_reentrant() throws TransactionAlreadyStartedException { TransactionContext.enterTransaction(UUID.randomUUID(), participantManager); coordinator.beginTransaction(); }