public void testGetByEmail() {
userTool.addUser("name1","password1","test1@test.com", UserRole.ADMIN);
userTool.addUser("name2","password2","test2@test.com", UserRole.USER);
userTool.addUser("name3","password3","test3@test.com", UserRole.ADMIN);
UserEntity user1 = getDao().getUserDao().getByEmail("test2@test.com");
assertNotNull(user1);
assertEquals("name2", user1.getName());
assertEquals("password2", user1.getPassword());
assertEquals(UserRole.USER, user1.getRole());
UserEntity user2 = getDao().getUserDao().getByEmail("test22@test.com");
assertNull(user2);
}