Assert.assertEquals(originalSize + 1, users.size());
}
@Test
public void canUserLogIn() throws Exception {
User anotherUser = new User();
anotherUser.setFirstName("John");
anotherUser.setSecondName("Tailor");
anotherUser.setEmail("john.tailor@mail.co.uk");
anotherUser.setLogin("tailorj");
anotherUser.setPasswordHash("8cb2237d0679ca88db6464eac60da96345513964");
anotherUser.setBirthDate(new Date()); // TODO String -> Date
anotherUser.setSex(Sex.MALE);
anotherUser.setHasAvatar(false);
anotherUser.setPreDefined(false);
ua.register(anotherUser);
User loggedInUser = userBean.logIn("tailorj", "8cb2237d0679ca88db6464eac60da96345513964");
Assert.assertEquals(anotherUser, loggedInUser);
}