### Question:
ESRichClientImp implements ESClient { @Override public ESResponse update(UpdateRequest updateRequest, String refreshPolicy) throws IOException { UpdateResponse updateResponse = rhlclient.update(updateRequest); updateRequest.setRefreshPolicy(refreshPolicy); return new ESResponse(updateResponse); } 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 update() throws IOException { ESRichClientImp esRCI = new ESRichClientImp(DEF_RHLCLIENT); List<Range> ranges = new ArrayList<>(); Range r1 = new Range("2018-01-05", "2018-01-05", "0", "23"); ranges.add(r1); Booking bk1 = new Booking(new TargetingChannel(), ranges, 0, "advId", 0); Map source = new HashMap(); source.put("days", new ArrayList()); source.put("bk_id", bk1.getBookingId()); Map query = new HashMap(); query.put("g", "g_m"); source.put("query", query); source.put("del", false); bk1 = new Booking("bookingID", source); SearchRequest sReq = new SearchRequest(""); ESResponse res1 = esRCI.search(sReq); assertNotNull(res1); assertNotNull(res1.getSourceMap()); UpdateRequest uReq = new UpdateRequest("", "doc", bk1.getId()); Map<String, Object> requestMap = new HashMap<>(); requestMap.put("del", true); uReq.doc(requestMap); ESResponse res = esRCI.update(uReq, WriteRequest.RefreshPolicy.IMMEDIATE.getValue()); assertNotNull(res); assertEquals(UpdateResponse.Result.UPDATED, res.getUpdateResponse().getResult()); }