### Question:
LibraryPerspective { public void perspectiveChangeEvent(@Observes PerspectiveChange event) { if (event.getIdentifier().equals(LibraryPlaces.LIBRARY_PERSPECTIVE)) { if (refresh) { libraryPlaces.refresh(() -> { if (getRootPanel() != null) { libraryPlaces.goToLibrary(); } }); } else { libraryPlaces.refresh(() -> { }); } } } LibraryPerspective(); @Inject  LibraryPerspective(final LibraryPlaces libraryPlaces,
                              final Event<WorkspaceProjectContextChangeEvent> projectContextChangeEvent); @Perspective PerspectiveDefinition buildPerspective(); @OnStartup void onStartup(final PlaceRequest placeRequest); void perspectiveChangeEvent(@Observes PerspectiveChange event); @OnClose void onClose(); PanelDefinition getRootPanel();  }### Answer:
@Test public void libraryDoesNotLoadOnPerspectiveChangeEventFromOtherPerspectives() { when(perspectiveChangeEvent.getIdentifier()).thenReturn("dora"); perspective.perspectiveChangeEvent(perspectiveChangeEvent); verify(libraryPlaces, never()).refresh(any()); }