### Question:
SystemUpdateEventListener extends EventDistributor<HybrisAdapter.SystemUpdatedEvent, FireflyExtension> { @Override protected void onEvent(HybrisAdapter.SystemUpdatedEvent event) { if (!hasListenersForTenant(event.getTenantId())) { return; } for (FireflyExtension fireflyExtension : getListenersForTenant(event.getTenantId())) { fireflyExtension.onUpdate(event.getMigration()); } } @Autowired  SystemUpdateEventListener(ClusterService clusterService,
                                     TenantService tenantService);   }### Answer:
@Test public void shouldCallAllListenersForTenant() throws Exception { listener.registerListener(TENANT_ID, extension); listener.onEvent(systemUpdatedEvent); verify(extension).onUpdate(MIGRATION); }
@Test public void shouldNotCallListenersForOtherTenants() throws Exception { listener.registerListener("otherTenantId", extension); listener.onEvent(systemUpdatedEvent); verify(extension, never()).onUpdate(any(PK.class)); }