### Question:
UserDatabaseModelJpa implements UserDatabaseModel, Serializable { @Transactional public int addUser(User newUser) { UserEntity userEntity = new UserEntity(); userEntity.copyUser(newUser); userEntity.setRegistrationDate(new Date()); userEntityDao.add(userEntity); return userEntity.getId(); }  @Transactional boolean addPasswordResetToken(PasswordResetToken token); @Transactional int addUser(User newUser); @Transactional boolean cancelAllPasswordResetTokens(int userId); @Transactional boolean confirmUserRegistration(String email); @Transactional boolean deleteUser(int userId); @Transactional int getRegisteredUserCount(Date since); PasswordResetToken getNewestPasswordResetToken(String email); User getUserByEmail(String email); User getUserByName(String name); User getUserBySocialAccount(SocialAccountDetails details); int getUserIdByEmail(String email); UserPassword getUserPassword(int userId); boolean isEmailRegistered(String email); boolean isUserNameRegistered(String name); @Transactional boolean makeLogInRecord(int userId, boolean logInSuccessfull, String usersIp); @Transactional int saveUserWithSocialAccount(User user, SocialAccountDetails details); @Transactional boolean setUserPassword(int userId, UserPassword password);  }### Answer:
@Test @Ignore public void testAddUser() throws SQLException, Exception { fillDatabase("userDatabaseModelHbnTest/beforeAddUser.xml"); UserPassword password = new UserPassword("ea1baa4cad9d822a51a1aa267a618fb2ac6d5d98a89709a595487ea493a69e90", "7886788cb39bf33c856ef18206a81ce4b498dc5a1a4199abc0cb0fb686eab008"); User user = new User(0, "carl", "carl@test.com", "ea587b759f423f0bfadfe7aeba0ee3fe", false, password, UserRanks.NORMAL_USER); int result = databaseModel.addUser(user); assertEquals(1, result); IDataSet expectedDataSet = loadFlatXmlDataSet("userDatabaseModelHbnTest/afterAddUser.xml"); assertTableContent(expectedDataSet, "um_user", new String[] { "reg_date" }); }