@Test
public void onWorkspaceContextUpdated() {
// Given: on workspace context update event: project active is true but
// userWorkspaceContext has read only access
WorkspaceContextUpdateEvent workspaceContextEvent =
mock(WorkspaceContextUpdateEvent.class);
when(workspaceContextEvent.isProjectActive()).thenReturn(true);
when(userWorkspaceContext.hasReadOnlyAccess()).thenReturn(true);
presenter.onWorkspaceContextUpdated(workspaceContextEvent);
// Then:
verify(userWorkspaceContext).setProjectActive(
workspaceContextEvent.isProjectActive());
verify(display).setChatTabVisible(false);
verify(display, times(1)).setSelectedTab(
SideMenuDisplay.NOTIFICATION_VIEW);
verify(display).setValidationOptionsTabVisible(false);
}