@Test void getString() throws SQLException { String column = RandomStringUtils.randomAlphabetic(10); String expectedValue = RandomStringUtils.random(40); when(resultSet.getString(column)).thenReturn(expectedValue); String result = ResultSetUtil.getString(resultSet, column); assertThat(result, is(expectedValue)); verify(resultSet, times(1)).getString(column); verifyNoMoreInteractions(resultSet); }
public static String getString(ResultSet rs, String columnLabel) { try { return rs.getString(columnLabel); } catch (SQLException e) { throw new RuntimeSqlException(e); } }
ResultSetUtil extends UtilityClass { public static String getString(ResultSet rs, String columnLabel) { try { return rs.getString(columnLabel); } catch (SQLException e) { throw new RuntimeSqlException(e); } } }
ResultSetUtil extends UtilityClass { public static String getString(ResultSet rs, String columnLabel) { try { return rs.getString(columnLabel); } catch (SQLException e) { throw new RuntimeSqlException(e); } }  }
ResultSetUtil extends UtilityClass { public static String getString(ResultSet rs, String columnLabel) { try { return rs.getString(columnLabel); } catch (SQLException e) { throw new RuntimeSqlException(e); } }  static String getString(ResultSet rs, String columnLabel); static void close(ResultSet rs); static Stream<T> stream(ResultSet rs, RowMapper<T> rowMapper); static Stream<T> stream(ThrowingSupplier<ResultSet, ? extends SQLException> rs, RowMapper<T> rowMapper); }
ResultSetUtil extends UtilityClass { public static String getString(ResultSet rs, String columnLabel) { try { return rs.getString(columnLabel); } catch (SQLException e) { throw new RuntimeSqlException(e); } }  static String getString(ResultSet rs, String columnLabel); static void close(ResultSet rs); static Stream<T> stream(ResultSet rs, RowMapper<T> rowMapper); static Stream<T> stream(ThrowingSupplier<ResultSet, ? extends SQLException> rs, RowMapper<T> rowMapper);  }