}
@Test
public void user_can_share_filter_if_logged_and_own_sharing_permission() {
when(authorizationDao.selectGlobalPermissions("john")).thenReturn(newArrayList(GlobalPermissions.DASHBOARD_SHARING));
UserSession userSession = MockUserSession.create().setLogin("john");
assertThat(service.canShareFilter(userSession)).isTrue();
userSession = MockUserSession.create().setLogin(null);
assertThat(service.canShareFilter(userSession)).isFalse();