### Question:
DayImpression implements Serializable { public void setHours(List<Impression> hours) { this.hours = hours; } DayImpression(String date, List<Impression> hours);  DayImpression();  DayImpression(Double[] dayCounts);  DayImpression(Object hoursMap); String getDate(); void setDate(String date); List<Impression> getHours(); void setHours(List<Impression> hours); void initAggregate(double[] aggregatedHCounts); long countImpressions(double price, TargetingChannel.PriceModel priceModel); static DayImpression add(DayImpression d1, DayImpression d2); static DayImpression buildEmptyDayImpression(String date); static DayImpression subtract(DayImpression d1, DayImpression d2); static DayImpression multiply(DayImpression d1, double r); @Override String toString();  }### Answer:
@Test public void setHours() { Double[] dayCnt = new Double[4]; dayCnt[0] = 47.0; dayCnt[1] = 48.1; dayCnt[2] = 49.2; dayCnt[3] = 50.3; DayImpression di = new DayImpression(dayCnt); List<Impression> hours = new ArrayList(); hours.add(new Impression()); H0 h0 = new H0(0); H1 h1 = new H1(1); H2 h2 = new H2(2); H3 h3 = new H3(3); hours.add(new Impression(h0, h1, h2, h3)); di.setHours(hours); List<Impression> exp = new ArrayList(); exp.add(new Impression()); exp.add(new Impression(h0, h1, h2, h3)); assertEquals(exp.toString(), di.getHours().toString()); String day = "20180105"; DayImpression di2 = new DayImpression(day, hours); List<Impression> hours2 = new ArrayList(); hours2.add(new Impression(new H0(6), new H1(7), new H2(8), new H3(9))); di2.setHours(hours2); exp = new ArrayList(); exp.add(new Impression(new H0(6), new H1(7), new H2(8), new H3(9))); assertEquals(exp.toString(), di2.getHours().toString()); }