LogConfig { public static Connection getConnection() throws SQLException { return instance.getDbConnection(); } LogConfig();  LogConfig(URI uri);  LogConfig(URI uri, String username, String password); static LogConfig getLastInstance(); URI getDbURI(); static Connection getConnection(); Connection getDbConnection(); @Override String toString();  }
@Test public void testGetConnection() throws SQLException { try (Connection connection = getConnection(); Statement stmt = connection.createStatement()) { assertNotNull(stmt); assertThat(connection.isClosed(), is(Boolean.FALSE)); LOG.info("Got connection {}.", connection); } }