StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
builder.applySettings(configuration.getProperties());
ServiceRegistry serviceRegistry = builder.build();
Settings testSettings = configuration.buildSettings(serviceRegistry);
JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
Connection con = null;
try {
con = jdbcServices.getConnectionProvider().getConnection();
JDBCMetaDataDialect dialect = new JDBCMetaDataDialect();
dialect.configure( ReverseEngineeringRuntimeInfo.createInstance(jdbcServices.getConnectionProvider(), jdbcServices.getSqlExceptionHelper().getSqlExceptionConverter(), new DefaultDatabaseCollector(dialect)));
Iterator tables = dialect.getTables( testSettings.getDefaultCatalogName(), testSettings.getDefaultSchemaName(), null );
assertHasNext( 0, tables );
} finally {
jdbcServices.getConnectionProvider().closeConnection(con);
}