@Test void getMetaData() throws SQLException { when(connection.getMetaData()).thenReturn(metadata); DatabaseMetaData result = ConnectionUtil.getMetaData(connection); verify(connection).getMetaData(); verifyNoMoreInteractions(connection); assertThat(result, sameInstance(metadata)); }
public static DatabaseMetaData getMetaData(Connection connection) { try { return connection.getMetaData(); } catch (SQLException e) { throw new RuntimeSqlException(e); } }
ConnectionUtil extends UtilityClass { public static DatabaseMetaData getMetaData(Connection connection) { try { return connection.getMetaData(); } catch (SQLException e) { throw new RuntimeSqlException(e); } } }
ConnectionUtil extends UtilityClass { public static DatabaseMetaData getMetaData(Connection connection) { try { return connection.getMetaData(); } catch (SQLException e) { throw new RuntimeSqlException(e); } }  }
ConnectionUtil extends UtilityClass { public static DatabaseMetaData getMetaData(Connection connection) { try { return connection.getMetaData(); } catch (SQLException e) { throw new RuntimeSqlException(e); } }  static DatabaseMetaData getMetaData(Connection connection); static void commit(Connection connection); static void rollback(Connection connection); static boolean execute(Connection connection, String sql); static PreparedStatement prepare(Connection connection, String sql); }
ConnectionUtil extends UtilityClass { public static DatabaseMetaData getMetaData(Connection connection) { try { return connection.getMetaData(); } catch (SQLException e) { throw new RuntimeSqlException(e); } }  static DatabaseMetaData getMetaData(Connection connection); static void commit(Connection connection); static void rollback(Connection connection); static boolean execute(Connection connection, String sql); static PreparedStatement prepare(Connection connection, String sql);  }