### Question:
SimpleEventCalendar implements EventCalendar { @Override public void clear() { eventList.clear(); minIndex = NULL; } SimpleEventCalendar(ClockReader clockReader, Comparator<SimulationEvent> eventComparator); @Override boolean isEmpty(); @Override SimulationEvent peekFirstEvent(); @Override SimulationEvent removeFirstEvent(); @Override List<SimulationEvent> getEvents(); @Override void addEvent(SimulationEvent event); @Override void clear(); void addEvents(Collection<SimulationEvent> simulationEvents);  }### Answer:
@Test public void testClear() throws Exception { SimulationEvent event1 = new SimulationEvent.Builder("any type").simulationTime(1).build(); EventCalendar calendar = new SimpleEventCalendar(clock, comparator); calendar.addEvent(event1); calendar.clear(); assertTrue(calendar.isEmpty()); assertNull(calendar.removeFirstEvent()); }
@Test public void testClear() throws Exception { SimulationEvent event1 = new SimulationEvent.Builder("any type").simulationTime(1).build(); EventCalendar calendar = new SimpleEventCalendar(clock, comparator); calendar.addEvent(event1); calendar.clear(); assertThat(calendar.isEmpty()).isTrue(); assertThat(calendar.removeFirstEvent()).isNull(); }