XAExceptionFactory extends AbstractExceptionFactory<XAException> { @Override public boolean indicatesFailure(XAException exception, Dialect dialect) { return dialect.indicatesFailure(exception); } XAExceptionFactory(); @Override XAException createException(String message); @Override boolean equals(XAException exception1, XAException exception2); @Override boolean indicatesFailure(XAException exception, Dialect dialect); @Override ExceptionType getType(); @Override boolean correctHeuristic(XAException exception, Phase phase);  }
@Test public void indicatesFailure() { Dialect dialect = mock(Dialect.class); XAException exception = new XAException(); when(dialect.indicatesFailure(exception)).thenReturn(true); boolean result = this.factory.indicatesFailure(exception, dialect); assertTrue(result); }