### Question:
BookingDaoESImp extends BaseDaoESImp implements BookingDao { @Override public Booking getBooking(String bookingId) throws IOException { BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder(); SearchRequest searchRequest; append(boolQueryBuilder, "bk_id", bookingId); append(boolQueryBuilder, "del", false); SearchSourceBuilder sourceBuilder = new SearchSourceBuilder().query(boolQueryBuilder).size(MAX_BOOKING_READ_PER_DAY); searchRequest = new SearchRequest(this.bookingsIndex).source(sourceBuilder); ESResponse esResponse = esclient.search(searchRequest); List docs = (List) ((Map) (esResponse.getSourceMap().get("hits"))).get("hits"); for (Object doc : docs) { Map mapDoc = (Map) doc; Booking booking = buildBooking(mapDoc); if (booking != null) { return booking; } } return null; } BookingDaoESImp();  BookingDaoESImp(Properties properties); @Override void removeBooking(String bookingId); @Override String createBooking(Booking booking); @Override Map<Day, List<Booking>> getBookings(Set<Day> days); @Override List<Booking> getBookings(String advId); @Override Booking getBooking(String bookingId); @Override Map<Day, List<BookingBucket>> getBookingBuckets(Set<Day> days); String createBookingBucket(BookingBucket bookingBucket); @Override boolean lockBooking(); @Override void unlockBooking(); @Override BookingBucket getMaxBookingBucketPriority(String day); @Override void updateBookingBucketWithAllocatedAmount(String bookingBucketId, Map<String, Double> newAllocatedAmount); @Override List<BookingBucket> findBookingBucketsWithAllocatedBookingId(String bookingId); @Override void removeBookingBucket(BookingBucket bookingBucket);  }### Answer:
@Test public void getBooking() throws IOException { BookingDaoESImp bkDaoImp = new BookingDaoESImp(DEF_PROP); bkDaoImp.setESClient(DEF_ESCLI); List<Booking> resArr = bkDaoImp.getBookings(DEF_ADVID); for (Booking bk : resArr) { String bkId = bk.getBookingId(); assertNotNull(bkDaoImp.getBooking(bkId)); } }