### Question:
SqlExecutionContextImpl implements SqlExecutionContext { public void addException(RuntimeException exception) { assertBegun(); assertConnectionNotNull(); failed = true; if (haltOnError) { throw exception; } logger.log("DS2JDBCGen0020", new Object[] { exception }); exceptionList.add(exception); } SqlExecutionContextImpl(DataSource dataSource, boolean localTx,
            boolean haltOnError); boolean isHaltOnError(); void setHaltOnError(boolean haltOnError); Statement getStatement(); PreparedStatement getPreparedStatement(String sql); List<RuntimeException> getExceptionList(); void addException(RuntimeException exception); void notifyException(); void destroy(); void begin(); void end(); void commitLocalTx();  }### Answer:
@Test public void testAddException() { SqlExecutionContextImpl context = new SqlExecutionContextImpl( new MockDataSource(), true, false); Connection connection = context.connection; context.begin(); assertEquals(0, context.getExceptionList().size()); context.addException(new SqlFailedRuntimeException(new SQLException(), "aaa", 1, "bbb")); context.end(); assertNotSame(connection, context.connection); assertEquals(1, context.getExceptionList().size()); context.destroy(); assertEquals(0, context.getExceptionList().size()); }