### Question:
IMSRequestQuery implements Serializable { @Override public String toString() { String result = "{" + "targetingChannel=" + getTargetingChannel().toString() + ",price=" + price + ",ranges="; for (Range range : getDays()) { result += range.toString(); } result += "}"; return result; }  @JsonProperty("targetingChannel") TargetingChannel getTargetingChannel(); @JsonProperty("targetingChannel") void setTargetingChannel(TargetingChannel targetingChannel); void setToday(String today); String getToday(); double getPrice(); List<Range> getDays(); void setDays(List<Range> days); void setPrice(double price); @Override String toString();  }### Answer:
@Test public void testToString() { IMSRequestQuery reqQry = new IMSRequestQuery(); TargetingChannel tc = new TargetingChannel(); tc.setG(Arrays.asList("g_f")); double price = 20; List<Range> ranges = new ArrayList<>(); Range r1 = new Range(); r1.setSt("2018-01-05"); r1.setEd("2018-01-05"); r1.setSh("0"); r1.setEh("23"); ranges.add(r1); reqQry.setTargetingChannel(tc); List<Range> ranges2 = new ArrayList<>(); Range r2 = new Range(); r2.setSt("2018-01-06"); r2.setEd("2018-01-06"); r2.setSh("0"); r2.setEh("23"); Range r3 = new Range(); r3.setSt("2018-01-07"); r3.setEd("2018-01-07"); r3.setSh("0"); r3.setEh("23"); ranges2.add(r2); ranges2.add(r3); reqQry.setDays(ranges2); String exp = "{targetingChannel={gender:[g_f],price_type:NONE,},price=9.223372036854776E18,ranges=Range{st='2018-01-06,ed='2018-01-06,sh=0,eh=23}Range{st='2018-01-07,ed='2018-01-07,sh=0,eh=23}}"; assertEquals(exp, reqQry.toString()); }