@Test public void removeModuleOnCapabilityEventWhenNotActive() throws Exception { when(legacyUrlEnabledHelper.isEnabled()).thenReturn(false); underTest.handle(capabilityEvent); verify(locator).remove(any(BindingPublisher.class)); }
@AllowConcurrentEvents @Subscribe public void handle(final CapabilityEvent event) { if (event.getReference().context().descriptor().type().equals(LegacyUrlCapabilityDescriptor.TYPE)) { toggleLegacyHttpBridgeModule(); } }
LegacyHttpBridgeService implements EventAware { @AllowConcurrentEvents @Subscribe public void handle(final CapabilityEvent event) { if (event.getReference().context().descriptor().type().equals(LegacyUrlCapabilityDescriptor.TYPE)) { toggleLegacyHttpBridgeModule(); } } }
LegacyHttpBridgeService implements EventAware { @AllowConcurrentEvents @Subscribe public void handle(final CapabilityEvent event) { if (event.getReference().context().descriptor().type().equals(LegacyUrlCapabilityDescriptor.TYPE)) { toggleLegacyHttpBridgeModule(); } } @Inject  LegacyHttpBridgeService(final MutableBeanLocator locator,
                                 final LegacyUrlEnabledHelper legacyUrlEnabledHelper); }
LegacyHttpBridgeService implements EventAware { @AllowConcurrentEvents @Subscribe public void handle(final CapabilityEvent event) { if (event.getReference().context().descriptor().type().equals(LegacyUrlCapabilityDescriptor.TYPE)) { toggleLegacyHttpBridgeModule(); } } @Inject  LegacyHttpBridgeService(final MutableBeanLocator locator,
                                 final LegacyUrlEnabledHelper legacyUrlEnabledHelper); @AllowConcurrentEvents @Subscribe void handle(final CapabilityEvent event); }
LegacyHttpBridgeService implements EventAware { @AllowConcurrentEvents @Subscribe public void handle(final CapabilityEvent event) { if (event.getReference().context().descriptor().type().equals(LegacyUrlCapabilityDescriptor.TYPE)) { toggleLegacyHttpBridgeModule(); } } @Inject  LegacyHttpBridgeService(final MutableBeanLocator locator,
                                 final LegacyUrlEnabledHelper legacyUrlEnabledHelper); @AllowConcurrentEvents @Subscribe void handle(final CapabilityEvent event);  }