### Question:
Day implements Comparable { public static String treatDayStr(String dayStr) { if (!dayStr.contains("-")) { dayStr = dayStr.substring(0, 4) + "-" + dayStr.substring(4, 6) + "-" + dayStr.substring(6, 8); } return dayStr; } Day(String dayStr);  Day(String dayStr, List<Integer> hours); String getDayStr(); List<Integer> getHours(); static List<Day> buildSortedDays(List<Range> ranges); static Set<String> getDayString(Set<Day> days); static Set<String> getDayStringTreated(Set<Day> days, String toBeRemoved); @Override int hashCode(); @Override boolean equals(Object dayObject); static String treatDayStr(String dayStr); @Override int compareTo(Object o);  }### Answer:
@Test public void treatDayStr() { String dayStr = "20180105"; assertEquals("2018-01-05", Day.treatDayStr(dayStr)); }