public void notify(PluginJarChangeListener listener, Collection<BundleOrPluginFileDetails> knowPluginFiles, Collection<BundleOrPluginFileDetails> currentPluginFiles) {
        List<BundleOrPluginFileDetails> oldPlugins = new ArrayList<>(knowPluginFiles);

        subtract(oldPlugins, currentPluginFiles).forEach(listener::pluginJarRemoved);

        currentPluginFiles.forEach(newPlugin -> {
            int index = oldPlugins.indexOf(newPlugin);
            if (index < 0) {
                listener.pluginJarAdded(newPlugin);
            } else if (newPlugin.doesTimeStampDiffer(oldPlugins.get(index))) {
                listener.pluginJarUpdated(newPlugin);
            }
        });
    }
@Test
    void shouldNotifyWhenPluginIsRemoved() {
        final PluginJarChangeListener listener = mock(PluginJarChangeListener.class);
        BundleOrPluginFileDetails pluginOne = mock(BundleOrPluginFileDetails.class);
        BundleOrPluginFileDetails pluginTwo = mock(BundleOrPluginFileDetails.class);
        BundleOrPluginFileDetails pluginThree = mock(BundleOrPluginFileDetails.class);

        List<BundleOrPluginFileDetails> knownPlugins = List.of(pluginOne, pluginTwo, pluginThree);
        List<BundleOrPluginFileDetails> newPlugins = List.of(pluginOne, pluginTwo);

        pluginChangeNotifier.notify(listener, knownPlugins, newPlugins);

        verify(listener).pluginJarRemoved(pluginThree);
        verify(listener, never()).pluginJarAdded(any());
        verify(listener, never()).pluginJarUpdated(any());
    }