class SaveEventQueue {

    public void removeSaved(TransUnitSaveEvent saveEvent, int savedVersion) {
        EventWrapper saved = new EventWrapper(saveEvent);
        Collection<EventWrapper> sameIdEvents =
                filter(eventQueue,
                        new FindByTransUnitIdPredicate(saved.getId()));
        if (sameIdEvents.size() == 2) {
            EventWrapper pending =
                    Iterables.find(sameIdEvents, NotSavingPredicate.INSTANCE);
            Log.info("found pending save:" + pending);
            pending.setVerNumber(savedVersion);
            Log.info("update version number of pending save:" + pending);
        }
        eventQueue.remove(saved);
    }

}