### Question:
Period { public Long duration() { return end - start; } Period(Long start, Long end); Long startTime(); Long endTime(); Long duration(); @Override String toString();  }### Answer:
@Test public void shouldReturnDuration() { Long t = System.currentTimeMillis(); Long t2 = t + 1000; Period period = new Period(t, t2); assertEquals(1000, period.duration(), 0L); }