LoggingDBIExceptionMapper.setLogger(logger);
}
@Test
public void testSqlExceptionIsCause() throws Exception {
StatementContext statementContext = mock(StatementContext.class);
RuntimeException runtimeException = new RuntimeException("DB is down");
SQLException sqlException = new SQLException("DB error", runtimeException);
DBIException dbiException = new NoResultsException("Unable get a result set", sqlException, statementContext);
dbiExceptionMapper.logException(9812, dbiException);