### Question:
DefaultFailureHandlerImpl implements FailureHandler { @Override public void onBeginFailure(GlobalTransaction tx, Throwable cause) { LOGGER.warn("Failed to begin transaction. ", cause); }  @Override void onBeginFailure(GlobalTransaction tx, Throwable cause); @Override void onCommitFailure(GlobalTransaction tx, Throwable cause); @Override void onRollbackFailure(GlobalTransaction tx, Throwable originalException); @Override void onRollbackRetrying(GlobalTransaction tx, Throwable originalException);  }### Answer:
@Test void onBeginFailure() { RootContext.bind(DEFAULT_XID); GlobalTransaction tx = GlobalTransactionContext.getCurrentOrCreate(); FailureHandler failureHandler = new DefaultFailureHandlerImpl(); failureHandler.onBeginFailure(tx, new MyRuntimeException("").getCause()); }