Oadr20bVENEiEventService { public List<String> findMissingEventID(VtnSessionConfiguration vtnConfiguration, List<String> retrievedIdList) { Map<String, OadrEvent> map = oadrEvents.get(vtnConfiguration.getVtnId()); if (map != null) { List<String> keys = new ArrayList<>(map.keySet()); keys.removeAll(retrievedIdList); return keys; } return Collections.emptyList(); }  OadrResponseType oadrDistributeEvent(VtnSessionConfiguration vtnConfiguration, OadrDistributeEventType event); boolean isKnownEvent(VtnSessionConfiguration vtnConfiguration, OadrEvent event); boolean isUpdatedEvent(VtnSessionConfiguration vtnConfiguration, String requestId, OadrEvent event); void saveOadrEvent(VtnSessionConfiguration vtnConfiguration, OadrEvent event); void removeAll(VtnSessionConfiguration vtnConfiguration, List<String> eventIdList); Map<String, OadrEvent> getOadrEvents(VtnSessionConfiguration vtnConfiguration); void putOadrEvents(VtnSessionConfiguration vtnConfiguration, OadrEvent event); List<ScheduledFuture<?>> getScheduledTask(VtnSessionConfiguration vtnConfiguration, String eventId); void addScheduledTask(VtnSessionConfiguration vtnConfiguration, String eventId, ScheduledFuture<?> task); List<String> findMissingEventID(VtnSessionConfiguration vtnConfiguration, List<String> retrievedIdList); void clearOadrEvents(); void addListener(Oadr20bVENEiEventServiceListener listener); Object handle(VtnSessionConfiguration multiConfig, String raw, OadrPayload oadrPayload); String request(String username, String payload);  }
@Test public void findMissingEventIDTest() { String eventId = "event1"; OadrEvent createOadrEvent = createOadrEvent(eventId, 0L); oadr20bVENEiEventService.saveOadrEvent(VTN_SOURCE, createOadrEvent); String[] retrieved = { eventId }; List<String> findMissingEventID = oadr20bVENEiEventService.findMissingEventID(VTN_SOURCE, Arrays.asList(retrieved)); assertEquals(0, findMissingEventID.size()); String eventId2 = "event2"; createOadrEvent = createOadrEvent(eventId2, 0L); oadr20bVENEiEventService.saveOadrEvent(VTN_SOURCE, createOadrEvent); findMissingEventID = oadr20bVENEiEventService.findMissingEventID(VTN_SOURCE, Arrays.asList(retrieved)); assertEquals(1, findMissingEventID.size()); assertEquals(eventId2, findMissingEventID.get(0)); oadr20bVENEiEventService.clearOadrEvents(); }