### Question:
BookingDaoESImp extends BaseDaoESImp implements BookingDao { @Override public List<BookingBucket> findBookingBucketsWithAllocatedBookingId(String bookingId) throws IOException { ExistsQueryBuilder existsQueryBuilder = new ExistsQueryBuilder("allocated_amount." + bookingId); SearchSourceBuilder sourceBuilder = new SearchSourceBuilder().query(existsQueryBuilder); SearchRequest searchRequest = new SearchRequest(this.bookingBucketsIndex); searchRequest.source(sourceBuilder); ESResponse esResponse = esclient.search(searchRequest); List<BookingBucket> result = new ArrayList<>(); List docs = (List) ((Map) (esResponse.getSourceMap().get("hits"))).get("hits"); for (Object doc : docs) { Map docMap = (Map) doc; BookingBucket bookingBucket = buildBookingBucket(docMap); if (bookingBucket == null) { continue; } result.add(bookingBucket); } return result; } 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 findBookingBucketsWithAllocatedBookingId() throws IOException { String day = "20181107", bookingId = "test_bkid_1"; List<String> prvBkOrder = new ArrayList(); BookingBucket bb1 = new BookingBucket(day, bookingId, prvBkOrder, 1); BookingDaoESImp bkDaoImp = new BookingDaoESImp(DEF_PROP); bkDaoImp.setESClient(DEF_ESCLI); String bbId = bkDaoImp.createBookingBucket(bb1); List<BookingBucket> res = bkDaoImp.findBookingBucketsWithAllocatedBookingId(bbId); assertNotNull(res); }