OpeningHours { public String getFormattedClosingTime() { return DateUtil.formatTimeFromMinutes(endMinute); } OpeningHours(String openingHours); boolean isInRange(int minute); String getFormattedClosingTime(); int getStartMinute(); int getEndMinute();  }
@Test public void testGetFormattedClosingTime() throws Exception { OpeningHours openingHours = new OpeningHours("9-4"); assertEquals("4",openingHours.getFormattedClosingTime()); openingHours = new OpeningHours("9-11"); assertEquals("11",openingHours.getFormattedClosingTime()); openingHours = new OpeningHours("9-"); assertEquals("0",openingHours.getFormattedClosingTime()); openingHours = new OpeningHours("9-12:30"); assertEquals("12:30",openingHours.getFormattedClosingTime()); openingHours = new OpeningHours("9-12:05"); assertEquals("12:05",openingHours.getFormattedClosingTime()); }