### Question:
UserDatabaseModelJpa implements UserDatabaseModel, Serializable { public PasswordResetToken getNewestPasswordResetToken(String email) { PasswordResetTokenEntity tokenEntity = passwordResetTokenEntityDao.getNewestToken(email); if (tokenEntity == null) { return null; } return new PasswordResetToken(tokenEntity.getUser().getId(), tokenEntity.getKey(), tokenEntity.getTime()); }  @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 public void testGetNewestPasswordResetToken() throws DatabaseUnitException, SQLException, Exception { fillDatabase("userDatabaseModelHbnTest/beforeGetNewestPasswordResetToken.xml"); PasswordResetToken result = databaseModel.getNewestPasswordResetToken("non-existing@test.com"); assertEquals(null, result); result = databaseModel.getNewestPasswordResetToken("mike@test.com"); assertEquals(null, result); result = databaseModel.getNewestPasswordResetToken("john@test.com"); assertNotNull(result); assertEquals("785bb1e5e77a14325fd31ebeae836fff", result.getKey()); }