### Question:
OrgTimestampRange { public boolean hasTime() { return hasTime; } OrgTimestampRange();  OrgTimestampRange(final String startDate, final String endDate, final String startTime,
                             final String endTime); String toString(); String toString(Locale locale); boolean hasTime(); LocalDateTime getStartdate(); void setStartdate(final LocalDateTime startdate, final boolean withTime); LocalDateTime getEnddate(); void setEnddate(final LocalDateTime enddate, final boolean withTime); static final String OUTDATEFORMAT; static final String OUTDATETIMEFORMAT; static final DateTimeFormatter INDATEFORMAT; static final DateTimeFormatter INTIMEFORMAT; }### Answer:
@Test public void testHasTime() throws Exception { OrgTimestampRange r = new OrgTimestampRange("2016-01-01", "2016-02-02", "00:00", "00:00"); assertTrue("Expecting a time", r.hasTime()); assertEquals("Wrong end year", 2016, r.getStartdate().getYear()); assertEquals("Wrong end month", 1, r.getStartdate().getMonthOfYear()); assertEquals("Wrong end day", 1, r.getStartdate().getDayOfMonth()); assertEquals("Wrong hour", 0, r.getStartdate().getHourOfDay()); assertEquals("Wrong minute", 0, r.getStartdate().getMinuteOfHour()); assertEquals("Wrong end year", 2016, r.getEnddate().getYear()); assertEquals("Wrong end month", 2, r.getEnddate().getMonthOfYear()); assertEquals("Wrong end day", 2, r.getEnddate().getDayOfMonth()); assertEquals("Wrong hour", 0, r.getEnddate().getHourOfDay()); assertEquals("Wrong minute", 0, r.getEnddate().getMinuteOfHour()); }