### Question:
IMSTimePoint implements Comparable<IMSTimePoint> { public static List<IMSTimePoint> appendListFromStartToEndHours(int start, int end, List<IMSTimePoint> imsTimePointList, Range elt) { while (start <= end) { IMSTimePoint localTempIMSTimePoint = new IMSTimePoint(0); localTempIMSTimePoint.setDate(elt.getEd()); localTempIMSTimePoint.setHourIndex(start); imsTimePointList.add(localTempIMSTimePoint); ++start; } return imsTimePointList; } IMSTimePoint(long epochTime); String toString(); String getDate(); void setDate(String date); int getHourIndex(); void setHourIndex(int hourIndex); static IMSTimePoint incrementHour(IMSTimePoint imsTimePoint); static IMSTimePoint incrementDay(IMSTimePoint imsTimePoint); static List<IMSTimePoint> build(List<Range> ranges); @Override int hashCode(); @Override boolean equals(Object obj); static List<IMSTimePoint> appendListFromStartToEndHours(int start, int end, List<IMSTimePoint> imsTimePointList, Range elt); LocalDateTime getDateTime(); @Override int compareTo(IMSTimePoint o);  }### Answer:
@Test public void appendListFromStartToEndHours() { List<IMSTimePoint> res = IMSTimePoint.appendListFromStartToEndHours(0, 23, new ArrayList(), new Range()); List<IMSTimePoint> exp = new ArrayList(); for (int i = 0; i < 24; i++) { IMSTimePoint localTempIMSTimePoint = new IMSTimePoint(0); localTempIMSTimePoint.setDate(new Range().getEd()); localTempIMSTimePoint.setHourIndex(i); exp.add(localTempIMSTimePoint); } assertEquals(exp.toString(), res.toString()); long epTime = Long.valueOf("1574641835000"); IMSTimePoint epochTime = new IMSTimePoint(epTime); long epTime2 = Long.valueOf("1574645435000"); IMSTimePoint epochTime2 = new IMSTimePoint(epTime2); List<IMSTimePoint> list = new ArrayList(); list.add(epochTime); list.add(epochTime2); Range r1 = new Range(); r1.setSt("2018-01-05"); r1.setEd("2018-01-05"); r1.setSh("0"); r1.setEh("23"); List<IMSTimePoint> res2 = IMSTimePoint.appendListFromStartToEndHours(0, 23, list, r1); exp = new ArrayList(); exp.add(epochTime); exp.add(epochTime2); for (int i = 0; i < 24; i++) { IMSTimePoint localTempIMSTimePoint = new IMSTimePoint(0); localTempIMSTimePoint.setDate(r1.getEd()); localTempIMSTimePoint.setHourIndex(i); exp.add(localTempIMSTimePoint); } assertEquals(exp.toString(), res2.toString()); }