factory.dropDatabase(params);
// try to connect again, it must fail
params.remove(PostgisNGDataStoreFactory.CREATE_DB_IF_MISSING.key);
try {
store = factory.createDataStore(params);
store.getTypeNames();
fail("This one should have failed, the database has just been dropped");
} catch(Exception e) {
// fine, it's what we expected
}