HTMLPluginProcessor extends AbstractRuntimePluginProcessor { public Optional<RuntimePlugin> lookupForTemplate(String templateName) { return getAvailableRuntimePlugins(). stream(). filter(p -> p.getPluginName().equalsIgnoreCase(templateName)).findAny(); } HTMLPluginProcessor(); @Inject  HTMLPluginProcessor(final Event<PluginAddedEvent> pluginAddedEvent,
                               final Event<PluginUpdatedEvent> pluginUpdatedEvent); Optional<RuntimePlugin> lookupForTemplate(String templateName);  }
@Test public void processTest() { assertFalse(processor.isRegistered("dora.html")); processor.process("dora.html", pluginDeploymentDir, true); assertTrue(processor.isRegistered("dora.html")); verify(pluginAddedEvent, times(1)).fire(any()); processor.process("dora.html", pluginDeploymentDir, true); verify(pluginUpdatedEvent, times(1)).fire(any()); assertTrue(processor.lookupForTemplate("dora.html").isPresent()); }