### Question:
ESRichClientImp implements ESClient { @Override public IndexResponse index(IndexRequest indexRequest, String refreshPolicy) throws IOException { indexRequest.setRefreshPolicy(refreshPolicy); IndexResponse indexResponse = rhlclient.index(indexRequest); return indexResponse; } 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 index() throws IOException { ESRichClientImp esRCI = new ESRichClientImp(DEF_RHLCLIENT); Booking bk1 = new Booking(DEF_TC, DEF_RANGES, DEF_PRICE, "advid100", 2); Map sourceMap = CommonUtil.convertToMap(bk1); IndexRequest indexRequest = new IndexRequest("bookings", "doc"); indexRequest.source(sourceMap); IndexResponse res = esRCI.index(indexRequest, WriteRequest.RefreshPolicy.IMMEDIATE.getValue()); assertEquals("bookings", res.getIndex()); }