GWTScriptPluginProcessor implements PluginProcessor { @PreDestroy void shutDown() { scriptRegistry.removeScripts(SCRIPT_REGISTRY_KEY); } GWTScriptPluginProcessor(); @Inject  GWTScriptPluginProcessor(final ScriptRegistry scriptRegistry,
                                    final Event<PluginAddedEvent> pluginAddedEvent,
                                    final Event<PluginUpdatedEvent> pluginUpdatedEvent); @Override void removeAll(); @Override boolean isRegistered(String pluginName); @Override boolean shouldProcess(String pluginName); @Override void process(String pluginName,
                        String pluginDeploymentDir,
                        boolean notifyClients);  }
@Test public void shutDownShouldRemoveScripts() throws Exception { processor.shutDown(); verify(scriptRegistry, times(1)).removeScripts("UF"); }