### Question:
PluggableDownloadStrategy implements DownloadStrategy { @PluginEventListener public void pluginModuleDisabled(final PluginModuleDisabledEvent event) { final ModuleDescriptor<?> module = event.getModule(); if (!(module instanceof DownloadStrategyModuleDescriptor)) { return; } unregister(module.getCompleteKey()); } PluggableDownloadStrategy(final PluginEventManager pluginEventManager); boolean matches(final String urlPath); void serveFile(final HttpServletRequest request, final HttpServletResponse response); void register(final String key, final DownloadStrategy strategy); void unregister(final String key); @PluginEventListener void pluginModuleEnabled(final PluginModuleEnabledEvent event); @PluginEventListener void pluginModuleDisabled(final PluginModuleDisabledEvent event);  }### Answer:
@Test public void testPluginModuleDisabled() throws Exception { ModuleDescriptor module = new DownloadStrategyModuleDescriptor(getDefaultModuleClassFactory()) { public String getCompleteKey() { return "jungle.plugin:lion-strategy"; } public DownloadStrategy getModule() { return new StubDownloadStrategy("/lion", "ROAR!"); } }; strategy.pluginModuleEnabled(new PluginModuleEnabledEvent(module)); assertTrue(strategy.matches("/lion/something")); strategy.pluginModuleDisabled(new PluginModuleDisabledEvent(module)); assertFalse(strategy.matches("/lion/something")); }