### Question:
MappedQueryResult implements QueryResult<T> { @Override public List<T> list() { List<T> result = new LinkedList<>(); Iterators.addAll(result, Iterators.transform(rows.iterator(), mapper::map)); mapper.mappingComplete(); return result; } MappedQueryResult(Iterable<Row> rows, RowMapper<T> mapper);  MappedQueryResult(ResultSet resultSet, RowMapper<T> mapper); @Override Iterator<T> iterator(); @Override List<T> list(); @Override T one(); @Override Stream<T> stream();  }### Answer:
@Test public void testList() { withSession(session -> { MappedQueryResult<String> resultSet = new MappedQueryResult<>(session.execute("select id, value from test"), row -> row.getString(1)); List<String> results = resultSet.list(); assertTrue(results.contains("one")); assertTrue(results.contains("two")); assertTrue(results.contains("three")); }); }