/** * Deserialize the custom serialized PreResponse. * * @param preResponse Custom serialized PreResponse * * @return De-serialized PreResponse object * * @throws IOException in case of deserialization of ResponseContext fails */ public PreResponse deserialize(String preResponse) throws IOException { JsonNode serializedPreResponse = nonResponseContextMapper.readTree(preResponse); return new PreResponse( getResultSet(serializedPreResponse.get(RESULT_SET_KEY)), getResponseContext(serializedPreResponse.get(RESPONSE_CONTEXT_KEY)) ); }