### Question:
ESRichClientImp implements ESClient { @Override public ESResponse search(SearchRequest searchRequest) throws ElasticsearchException, IOException, JSONException { try { SearchResponse response = rhlclient.search(searchRequest); LOGGER.debug("response={}", CommonUtil.removeEscapingCharacters(response.toString())); Map<String, Object> map = QueryUtil.toMap(QueryUtil.extractAggregationValue(response)); return new ESResponse(response, map); } catch (ElasticsearchException e1) { throw e1; } catch (Exception e2) { throw e2; } } ESRichClientImp(Properties properties);  ESRichClientImp(RestHighLevelClient rhlclient); @Override ESResponse search(SearchRequest searchRequest); @Override ESResponse update(UpdateRequest updateRequest, String refreshPolicy); @Override ESResponse searchScroll(SearchScrollRequest searchScrollRequest); @Override IndexResponse index(IndexRequest indexRequest, String refreshPolicy); @Override boolean delete(DeleteRequest deleteRequest);  }### Answer:
@Test public void search() throws IOException { ESRichClientImp esRCI = new ESRichClientImp(DEF_PROP); SearchRequest sReq = new SearchRequest(""); ESResponse res = esRCI.search(sReq); assertNotNull(res); assertNotNull(res.getSearchResponse()); try { sReq = new SearchRequest("test"); res = esRCI.search(sReq); assertNotNull(res); } catch (Exception e) { assertNotNull(e); } }