JdbcUtils { public static void closeQuietly(ResultSet resultSet) { try { if (resultSet != null) { resultSet.close(); } } catch (SQLException exception) { if (logger.isWarnEnabled()) { logger.warn("Failed closing result set", exception); } } } private  JdbcUtils(); static JdbcUrl getJdbcUrl(Connection connection); static void closeQuietly(ResultSet resultSet); static void closeQuietly(Statement statement); static void closeQuietly(Connection connection); static void closeQuietly(Session session); static void closeQuietly(ScriptProcessor scriptProcessor);  }
@Test public void testCloseResultSet() throws SQLException { ResultSet resultSet = mock(ResultSet.class); closeQuietly(resultSet); verify(resultSet).close(); }
@Test public void testCloseStatement() throws SQLException { Statement statement = mock(Statement.class); closeQuietly(statement); verify(statement).close(); }
@Test public void testCloseConnection() throws SQLException { Connection connection = mock(Connection.class); closeQuietly(connection); verify(connection).close(); }