@Test
public void anInvalidSessionShouldNotReturnTheCurrentUser() {

    // Given
    given(httpSession.getAttribute(SecurityParameters.getUserSessionKey())).willReturn(null);
    given(userDao.get(anyLong())).willReturn(null);
    // When
    CurrentUserDto currentUserDto = currentUserDtoProvider.get();
    // Then
    assertFalse(currentUserDto.isLoggedIn());
    assertNull(currentUserDto.getUser());
}