@Test @SuppressWarnings("PMD.CloseResource")
public void createConnection_should_haveDataTypeFactory() throws SQLException {

    final DataSource dataSource = createMock(DataSource.class);
    final IDataTypeFactory dataTypeFactory = createMock(IDataTypeFactory.class);
    final Connection conn = EasyMock.createNiceMock(Connection.class);
    connectionFactory.setDataSource(dataSource);
    connectionFactory.setDataTypeFactory(dataTypeFactory);
    expect(dataSource.getConnection()).andReturn(conn);
    replayAll();
    final IDatabaseConnection connection = connectionFactory.createConnection();
    final IDataTypeFactory actual = (IDataTypeFactory)
            connection.getConfig().getProperty("http://www.dbunit.org/properties/datatypeFactory");
    assertThat(actual, is(dataTypeFactory));
    verifyAll();
}