### Question:
Impression implements Serializable { public long getIndividualHistogramCountByPriceCategory(int priceCategory) { long t = 0; switch (priceCategory) { case 0: t = h0.getT(); break; case 1: t = h1.getT(); break; case 2: t = h2.getT(); break; case 3: t = h3.getT(); break; default: return t; } return t; } 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 getIndividualHistogramCountByPriceCategory() { Double[] dayCnt = new Double[]{1.1, 2.2, 3.3, 4.4}; Impression i1 = new Impression(dayCnt); assertEquals(1, i1.getIndividualHistogramCountByPriceCategory(0), 0); assertEquals(2, i1.getIndividualHistogramCountByPriceCategory(1), 0); assertEquals(3, i1.getIndividualHistogramCountByPriceCategory(2), 0); assertEquals(4, i1.getIndividualHistogramCountByPriceCategory(3), 0); assertEquals(0, i1.getIndividualHistogramCountByPriceCategory(4), 0); }