### Question:
InventoryEstimateDaoESImp extends BaseDaoESImp implements InventoryEstimateDao { @Override public Map<Day, Impression> aggregatePredictionsFullDaysWithRegionRatio(TargetingChannel targetingChannel, Set<Day> days) throws IOException { Map<Day, Impression> result = new HashMap<>(); Map<Double, BoolQueryBuilder> boolQueryBuilderRatioMap = this.createQueryForSingleValuesWithRegionRatio(targetingChannel); for (Map.Entry<Double, BoolQueryBuilder> entry : boolQueryBuilderRatioMap.entrySet()) { BoolQueryBuilder query = entry.getValue(); Double regionRatio = entry.getKey(); Map<Day, Impression> countMap = getImpressionCountForFullDays(query, Day.getDayString(days)); countMap = applyRegionRatio(null, countMap, regionRatio); for (Map.Entry<Day, Impression> entry1 : countMap.entrySet()) { Day _day = entry1.getKey(); Impression _impression = entry1.getValue(); if (result.containsKey(_day)) { Impression newImpression = Impression.add(_impression, result.get(_day)); result.put(_day, newImpression); } else { result.put(_day, _impression); } } } return result; } InventoryEstimateDaoESImp();  InventoryEstimateDaoESImp(Properties properties); @Override DayImpression getHourlyPredictions(TargetingChannel targetingChannel,
                                              double tbrRatio); @Override Impression getPredictions_SIGMA_TCs_PI_BNs(Day day, List<TargetingChannel> tcs, List<TargetingChannel> bns); @Override Impression getPredictions_PI_TCs_DOT_qBAR(Day day, List<TargetingChannel> tcs, TargetingChannel q); @Override Impression getPredictions_PI_BNs_MINUS_SIGMA_BMs_DOT_q(Day day, List<TargetingChannel> bns, List<TargetingChannel> bms, TargetingChannel q); @Override Impression getPredictions_SIGMA_BMs_PLUS_qBAR_DOT_BNs(Day day, List<TargetingChannel> bms, TargetingChannel q, List<TargetingChannel> bns); @Override Impression getPredictions_PI_TCs(Day day, List<TargetingChannel> tcs); @Override Map<Day, Impression> aggregatePredictionsFullDaysWithRegionRatio(TargetingChannel targetingChannel,
                                                                            Set<Day> days); @Override Map<Day, Impression> aggregatePredictionsFullDays(TargetingChannel targetingChannel, Set<Day> days);  }### Answer:
@Test public void aggregatePredictionsFullDaysWithRegionRatio() throws IOException { InventoryEstimateDaoESImp invEstImp = new InventoryEstimateDaoESImp(DEF_PROP); invEstImp.setESClient(DEF_ESCLI); List<Range> ranges = new ArrayList<>(); Range r1 = new Range(); r1.setSt("2018-01-07"); r1.setEd("2018-01-07"); r1.setSh("0"); r1.setEh("23"); Range r2 = new Range(); r2.setSt("2018-01-09"); r2.setEd("2018-01-09"); r2.setSh("5"); r2.setEh("22"); Range r3 = new Range(); r3.setSt("2018-11-05"); r3.setEd("2018-11-05"); r3.setSh("7"); r3.setEh("11"); Range r4 = new Range(); r4.setSt("2018-11-07"); r4.setEd("2018-11-07"); r4.setSh("0"); r4.setEh("23"); ranges.add(r1); ranges.add(r2); ranges.add(r3); ranges.add(r4); List<Day> sortedDays = Day.buildSortedDays(ranges); Set<Day> daySet = new HashSet<>(sortedDays); Map<Day, Impression> res = invEstImp.aggregatePredictionsFullDaysWithRegionRatio(DEF_TC, daySet); assertNotNull(res); }