### Question:
TimeRange { public boolean isValid() { return valid; } TimeRange(String start, String end);  TimeRange(Long start, Long end); long getStart(); long getEnd(); boolean isValid(); String getProblem(); @Override String toString();  }### Answer:
@Test public void testInvalidTimeStamps() { TimeRange timeRange = new TimeRange("foo", "bar"); assertFalse(timeRange.isValid()); timeRange = new TimeRange("", "bar"); assertFalse(timeRange.isValid()); timeRange = new TimeRange("foo", ""); assertFalse(timeRange.isValid()); timeRange = new TimeRange("+foo", ""); assertFalse(timeRange.isValid()); timeRange = new TimeRange("-foo", ""); assertFalse(timeRange.isValid()); timeRange = new TimeRange("", "+bar"); assertFalse(timeRange.isValid()); timeRange = new TimeRange("", "-bar"); assertFalse(timeRange.isValid()); }
@Test public void testEmptyRange() { assertFalse(new TimeRange("7", "7").isValid()); }
@Test public void testInvalidRange() { assertFalse(new TimeRange("7", "5").isValid()); }