### Question:
LocalTimeRange extends Range<LocalTime> { public static LocalTimeRange after(final LocalTime after) { if (after == null) { throw new IllegalArgumentException("range cannot be after null"); } if (after.equals(LocalTime.MAX)) { throw new IllegalArgumentException("range cannot be after the maximum time"); } return new LocalTimeRange(after.plusNanos(1), MAXIMUM); } private  LocalTimeRange(final LocalTime lowerBound, final LocalTime upperBound); static LocalTimeRange between(final int startHour, final int endHour); static LocalTimeRange midnight(); static LocalTimeRange endOfDay(); static LocalTimeRange startOfDay(); static LocalTimeRange noon(); static LocalTimeRange beforeNoon(); static LocalTimeRange afterNoon(); static LocalTimeRange now(); static LocalTimeRange all(); static LocalTimeRange after(final LocalTime after); static LocalTimeRange before(final LocalTime before);  }### Answer:
@Test public void afterTime() { final LocalTime time = RDG.localTime().next(); final LocalTimeRange before = LocalTimeRange.after(time); assertThat(before.lowerBound()).isEqualTo(time.plusNanos(1)); assertThat(before.upperBound()).isEqualTo(MAX); }
@Test public void cannotBeAfterNull() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("range cannot be after null"); after(null); }
@Test public void cannotBeAfterMaximumTime() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("range cannot be after the maximum time"); after(LocalTime.MAX); }