/** * Generates ResultSet object from the JsonNode which contains the serialized ResultSet. * * @param serializedResultSet JsonNode which contains the serialized ResultSet * * @return ResultSet object generated from JsonNode */ private ResultSet getResultSet(JsonNode serializedResultSet) { ResultSetSchema resultSetSchema = getResultSetSchema(serializedResultSet.get(SCHEMA_KEY)); List<Result> results = Streams.stream(serializedResultSet.get(RESULTS_KEY)) .map(serializedResult -> getResult(serializedResult, resultSetSchema)) .collect(Collectors.toList()); return new ResultSet(resultSetSchema, results); }