public static void setUpTest(Module module) { Connection connection = null; try { DataSource ds = module.findService(DataSource.class).get(); connection = ds.getConnection(); Assume.assumeNotNull(connection); } catch (Throwable t) { t.printStackTrace(); Assume.assumeNoException(t); } finally { SQLUtil.closeQuietly(connection); } }