### Question:
DateTimeValue { public boolean hasTime() { return !StringUtils.isEmpty(getTime()); } DateTimeValue(); void setDate(final String date); void setTime(final String time); String getTime(); String getDate(); boolean hasDate(); boolean hasTime();  }### Answer:
@Test public void testHasTimeWhenTimeIsNotSet() { final DateTimeValue value = new DateTimeValue(); final boolean actual = value.hasTime(); assertFalse(actual); }
@Test public void testHasTime() { final DateTimeValue value = new DateTimeValue(); value.setTime("time"); final boolean actual = value.hasTime(); assertTrue(actual); }