@Test
public void testCreateConnection() throws Exception {

    // GIVEN
    final String schema = "foo";
    // WHEN
    final IDatabaseConnection dbConnection = FACTORY.createConnection(connection, schema);
    // THEN
    assertThat(dbConnection, notNullValue());
    final Object typeFactory = dbConnection.getConfig().getProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY);
    assertThat(typeFactory, notNullValue());
    assertThat(typeFactory.getClass(), equalTo(Db2DataTypeFactory.class));
    final Object metadataHandler = dbConnection.getConfig().getProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER);
    assertThat(metadataHandler, notNullValue());
    assertThat(metadataHandler.getClass(), equalTo(Db2MetadataHandler.class));
    assertThat(dbConnection.getSchema(), equalTo(schema));
}