void (@NotNull List<? extends SearchEverywhereFoundElementInfo> removed) { removed.forEach(info -> { List<String> list = myMap.get(info.getContributor().getSearchProviderId()); Assert.assertNotNull("Trying to remove object, that wasn't added", list); list.remove(info.getElement()); }); }