### Question:
ClusterLibraryObserver { public void onSystemRepositoryChangedEvent(@Observes @OrgUnit final SystemRepositoryChangedEvent systemRepositoryChangedEvent) { if (clusterService.isAppFormerClustered()) { clusterLibraryEvent.fire(new ClusterLibraryEvent()); } } ClusterLibraryObserver(); @Inject  ClusterLibraryObserver(ClusterService clusterService,
                                  @SpacesUpdated Event<ClusterLibraryEvent> clusterLibraryEvent); void onSystemRepositoryChangedEvent(@Observes @OrgUnit final SystemRepositoryChangedEvent systemRepositoryChangedEvent); void onNewOrganizationalUnitEvent(@Observes NewOrganizationalUnitEvent newOrganizationalUnitEvent); void onNewOrganizationalUnitEvent(@Observes ProjectCountUpdate projectCountUpdateEvent);  }### Answer:
@Test public void onSystemRepositoryChangedEventShouldBeTranslatedToAClusterEvent() { when(clusterService.isAppFormerClustered()).thenReturn(true); clusterLibraryObserver.onSystemRepositoryChangedEvent(new SystemRepositoryChangedEvent()); verify(clusterLibraryEvent).fire(any()); }
@Test public void onSystemRepositoryChangedEventShouldNotBeTranslatedToAClusterEvent() { when(clusterService.isAppFormerClustered()).thenReturn(false); clusterLibraryObserver.onSystemRepositoryChangedEvent(new SystemRepositoryChangedEvent()); verify(clusterLibraryEvent, never()).fire(any()); }