@Test
public void aValidSessionShouldReturnTheCurrentUser(User user) {

    // Given
    given(httpSession.getAttribute(SecurityParameters.getUserSessionKey())).willReturn(A_USER_ID);
    given(userDao.get(A_USER_ID)).willReturn(user);
    UserDto userDto = User.createDto(user);
    // When
    CurrentUserDto currentUserDto = currentUserDtoProvider.get();
    // Then
    assertTrue(currentUserDto.isLoggedIn());
    assertEquals(userDto, currentUserDto.getUser());
}