@Test public void testMostRecentlyCompletedEvent() { assertEquals(event2, handlingHistory.getMostRecentlyCompletedEvent()); }
public HandlingEvent getMostRecentlyCompletedEvent() { List<HandlingEvent> distinctEvents = getDistinctEventsByCompletionTime(); if (distinctEvents.isEmpty()) { return null; } else { return distinctEvents.get(distinctEvents.size() - 1); } }
HandlingHistory { public HandlingEvent getMostRecentlyCompletedEvent() { List<HandlingEvent> distinctEvents = getDistinctEventsByCompletionTime(); if (distinctEvents.isEmpty()) { return null; } else { return distinctEvents.get(distinctEvents.size() - 1); } } }
HandlingHistory { public HandlingEvent getMostRecentlyCompletedEvent() { List<HandlingEvent> distinctEvents = getDistinctEventsByCompletionTime(); if (distinctEvents.isEmpty()) { return null; } else { return distinctEvents.get(distinctEvents.size() - 1); } } HandlingHistory(Collection<HandlingEvent> handlingEvents); }
HandlingHistory { public HandlingEvent getMostRecentlyCompletedEvent() { List<HandlingEvent> distinctEvents = getDistinctEventsByCompletionTime(); if (distinctEvents.isEmpty()) { return null; } else { return distinctEvents.get(distinctEvents.size() - 1); } } HandlingHistory(Collection<HandlingEvent> handlingEvents); List<HandlingEvent> getAllHandlingEvents(); List<HandlingEvent> getDistinctEventsByCompletionTime(); HandlingEvent getMostRecentlyCompletedEvent(); @Override boolean equals(Object o); @Override int hashCode(); }
HandlingHistory { public HandlingEvent getMostRecentlyCompletedEvent() { List<HandlingEvent> distinctEvents = getDistinctEventsByCompletionTime(); if (distinctEvents.isEmpty()) { return null; } else { return distinctEvents.get(distinctEvents.size() - 1); } } HandlingHistory(Collection<HandlingEvent> handlingEvents); List<HandlingEvent> getAllHandlingEvents(); List<HandlingEvent> getDistinctEventsByCompletionTime(); HandlingEvent getMostRecentlyCompletedEvent(); @Override boolean equals(Object o); @Override int hashCode(); static final HandlingHistory EMPTY; }