### Question:
GremlinServerStatementResult implements StatementResult { @Override public ResultSummary consume() { list(); return new GremlinServerResultSummary(statement, serverInfo); } GremlinServerStatementResult(ServerInfo serverInfo,
                                 Statement statement,
                                 Iterator<Map<String, Object>> iterator,
                                 GremlinCypherValueConverter converter); @Override List<String> keys(); @Override boolean hasNext(); @Override Record next(); @Override Record single(); @Override Record peek(); @Override List<Record> list(); @Override List<T> list(Function<Record, T> mapFunction); @Override ResultSummary consume(); @Override ResultSummary summary();  }### Answer:
@Test public void consume() { List<Map<String, Object>> results = asList( getRow(1), getRow(2) ); StatementResult statementResult = new GremlinServerStatementResult(serverInfo, statement, results.iterator(), converter); assertThat(statementResult.hasNext()).isTrue(); assertThat(statementResult.consume().server()).isEqualTo(serverInfo); assertThat(statementResult.hasNext()).isFalse(); }