### Question:
JdbcIntermediateCursor implements IntegralIntermediateCursor<R> { @Override public R fetch() { if (!myHasRows) { if (myResultLayout.kind == ResultLayout.Kind.EXISTENCE) { return (R) Boolean.FALSE; } else { return null; } } if (!myOpened) throw new IllegalStateException("The cursor is not opened or is yet closed."); final R result; try { result = myRowsCollector.collectRows(myResultSet, myCollectLimit); } catch (SQLException sqle) { close(); throw mySeance.mySession.recognizeException(sqle, mySeance.myStatementText); } myHasRows = myRowsCollector.hasMoreRows; if (!myHasRows) close(); return result; } protected  JdbcIntermediateCursor(@NotNull final JdbcIntermediateSeance seance,
                                   @NotNull final ResultSet resultSet,
                                   @NotNull final ResultLayout<R> resultLayout,
                                   final boolean isDefault,
                                   @Nullable final Boolean hasRows); @Override boolean hasRows(); @NotNull @Override String[] getColumnNames(); synchronized void setCollectLimit(final int limit); @Override R fetch(); @Override synchronized void close();  }### Answer:
@Test public void query_hash_map() { JdbcIntermediateSession session = openSession(); performStatements(session, "create table if not exists map_1 (K integer, V bigint)", "insert into map_1 values (11,10000001), (22,20000002), (33,30000003)" ); JdbcIntermediateSeance seance = session.openSeance("select * from map_1", null); seance.execute(); JdbcIntermediateCursor<Map<Integer, Long>> cursor = seance.openDefaultCursor(Layouts.hashMapOf(Integer.class, Long.class)); Map<Integer, Long> map = cursor.fetch(); assertThat(map).containsEntry(11, 10000001L) .containsEntry(22, 20000002L) .containsEntry(33, 30000003L) .hasSize(3); }