### Question:
Impression implements Serializable { public static Impression multiply(Impression i1, double r) { Impression item = new Impression(); item.h0 = new H0(i1.getH0().getT() * r); item.h1 = new H1(i1.getH1().getT() * r); item.h2 = new H2(i1.getH2().getT() * r); item.h3 = new H3(i1.getH3().getT() * r); return item; } Impression();  Impression(H0 h0, H1 h1, H2 h2, H3 h3);  Impression(Double[] dayCounts);  Impression(double[] dayCounts);  Impression(Map map); Long getTotal(); double getValueForHIndex(int h_index); long countImpressions(double price, TargetingChannel.PriceModel priceModel); H1 getH1(); void setH1(H1 h1); H0 getH0(); void setH0(H0 h0); H2 getH2(); void setH2(H2 h2); H3 getH3(); void setH3(H3 h3); Integer getH_index(); void setH_index(Integer h_index); void adjustPositive(); List<Double> getHs(); static Impression add(Impression i1, Impression i2); static Impression subtract(Impression i1, Impression i2); static Impression multiply(Impression i1, double r); long getCountByPriceCategory(int priceCategory); long getIndividualHistogramCountByPriceCategory(int priceCategory); void adjustValue(int priceCategory, long t); @Override String toString(); static final int TOTAL_NUM_OF_PRICE_CATEGORIES; }### Answer:
@Test public void multiply() { Double[] dayCnt = new Double[]{1.1, 2.2, 3.3, 5.5}; Impression i1 = new Impression(dayCnt); Impression res = Impression.multiply(i1, 10); double d1 = (double) Math.round(Double.parseDouble("1.1")); double d2 = (double) Math.round(Double.parseDouble("2.2")); double d3 = (double) Math.round(Double.parseDouble("3.3")); double d4 = (double) Math.round(Double.parseDouble("5.5")); Double[] expCnt = new Double[]{d1 * 10, d2 * 10, d3 * 10, d4 * 10}; Impression exp = new Impression(expCnt); assertEquals(exp.toString(), res.toString()); }