@Test
public void shouldForgetUser() {
mockAuthentication("userWhoWantToForget@ippon.fr");
User userWhoWantToForget = userService.getUserByUsername("userWhoWantToForget");
assertThat(userWhoWantToForget.getFriendsCount(), is(1L));
User userToForget = new User();
userToForget.setLogin("userToForget@ippon.fr");
userService.createUser(userToForget);
userToForget.setDailyDigestSubscription(false);
userToForget.setWeeklyDigestSubscription(false);
userService.updateUser(userToForget);
assertTrue(friendshipService.unfollowUser("userToForget"));
userWhoWantToForget = userService.getUserByUsername("userWhoWantToForget");
assertThat(userWhoWantToForget.getFriendsCount(), is(0L));
User userWhoIsForgotten = userService.getUserByUsername("userToForget");
assertThat(userWhoIsForgotten.getFollowersCount(), is(0L));
}