### Question:
InventoryEstimateDaoESImp extends BaseDaoESImp implements InventoryEstimateDao { @Override public Impression getPredictions_SIGMA_BMs_PLUS_qBAR_DOT_BNs(Day day, List<TargetingChannel> bms, TargetingChannel q, List<TargetingChannel> bns) throws IOException { if (CommonUtil.isEmpty(bns)) { return new Impression(); } BoolQueryBuilder bmsqb = createOrQueryForSingleValue(bms); BoolQueryBuilder qb = createInvQueryForSingleValue(q); bmsqb = bmsqb.should(qb); BoolQueryBuilder bnsqb = createAndQueryForSingleValue(bns); bnsqb = bnsqb.must(bmsqb); return getPredictionsForQuery(day, bnsqb); } 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 getPredictions_SIGMA_BMs_PLUS_qBAR_DOT_BNs() throws IOException { InventoryEstimateDaoESImp invEstImp = new InventoryEstimateDaoESImp(DEF_PROP); invEstImp.setESClient(DEF_ESCLI); List<TargetingChannel> bms = new ArrayList(), bns = new ArrayList(); TargetingChannel bn1 = new TargetingChannel(), bn2 = new TargetingChannel(), bn3 = new TargetingChannel(); bn1.setA(Arrays.asList("3")); bn2.setG(Arrays.asList("g_f")); bn3.setR(Arrays.asList("456")); bns.add(bn1); bns.add(bn2); bns.add(bn3); TargetingChannel bm1 = new TargetingChannel(), bm2 = new TargetingChannel(), bm3 = new TargetingChannel(); bm1.setA(Arrays.asList("2")); bm1.setG(Arrays.asList("g_m")); bm2.setA(Arrays.asList("3")); bm3.setR(Arrays.asList("456")); bms.add(bm1); bms.add(bm2); bms.add(bm3); Impression res = invEstImp.getPredictions_SIGMA_BMs_PLUS_qBAR_DOT_BNs(DEF_DAY, bms, DEF_TC, new ArrayList()); assertNotNull(res); String exp = "{{h:0,t:h0}{h:0,t:h1}{h:0,t:h2}{h:0,t:h3}}"; assertEquals(exp, res.toString()); res = invEstImp.getPredictions_SIGMA_BMs_PLUS_qBAR_DOT_BNs(DEF_DAY, bms, DEF_TC, bns); assertNotNull(res); assertEquals(exp, res.toString()); }