### Question:
DefaultCompositeEventStatusManager implements CompositeEventStatusManager { @Override public List<CompositeEventStatus> getCompositeEventStatuses(List<CompositeEvent> compositeEvents, String entityId) throws Exception { List<Event> allEvents = new ArrayList<>(); Map<String, CompositeEventStatus> map = new HashMap<>(); for (CompositeEvent compositeEvent : compositeEvents) { CompositeEventStatus compositeEventStatus = new CompositeEventStatus(compositeEvent); for (Event event : compositeEvent.getEvents()) { map.put(event.getId(), compositeEventStatus); } allEvents.addAll(compositeEvent.getEvents()); } for (EventStatus eventStatus : getEventStatuses(allEvents, entityId)) { map.get(eventStatus.getEvent().getId()).add(eventStatus); } List<CompositeEventStatus> results = new ArrayList<>(); for (CompositeEvent event : compositeEvents) { results.add(map.get(event.getEvents().get(0).getId())); } return results; }  @Override List<CompositeEventStatus> getCompositeEventStatuses(List<CompositeEvent> compositeEvents, String entityId);  }### Answer:
@Test void getCompositeEventStatusesWhenEmpty() throws Exception { List<CompositeEventStatus> statuses = this.eventStatusManager.getCompositeEventStatuses(Collections.emptyList(), null); assertTrue(statuses.isEmpty()); }