// Path: src/main/java/com/raibledesigns/service/UserManager.java
// public interface UserManager extends GenericManager<User, Long> {
//     /**
//      * Convenience method for testing - allows you to mock the DAO and set it on an interface.
//      * @param userDao the UserDao implementation to use
//      */
//     void setUserDao(UserDao userDao);
// 
//     /**
//      * Convenience method for testing - allows you to mock the PasswordEncoder and set it on an interface.
//      * @param passwordEncoder the PasswordEncoder implementation to use
//      */
//     void setPasswordEncoder(PasswordEncoder passwordEncoder);
// 
// 
//     /**
//      * Retrieves a user by userId.  An exception is thrown if user not found
//      *
//      * @param userId the identifier for the user
//      * @return User
//      */
//     User getUser(String userId);
// 
//     /**
//      * Finds a user by their username.
//      * @param username the user's username used to login
//      * @return User a populated user object
//      * @throws org.springframework.security.core.userdetails.UsernameNotFoundException
//      *         exception thrown when user not found
//      */
//     User getUserByUsername(String username) throws UsernameNotFoundException;
// 
//     /**
//      * Retrieves a list of all users.
//      * @return List
//      */
//     @Secured({"ROLE_ADMIN"})
//     List<User> getUsers();
// 
//     /**
//      * Saves a user's information.
//      *
//      * @param user the user's information
//      * @throws UserExistsException thrown when user already exists
//      * @return user the updated user object
//      */
//     @Transactional(rollbackOn = UserExistsException.class)
//     User saveUser(User user) throws UserExistsException;
// 
//     /**
//      * Removes a user from the database
//      *
//      * @param user the user to remove
//      */
//     void removeUser(User user);
// 
//     /**
//      * Removes a user from the database by their userId
//      *
//      * @param userId the user's id
//      */
//     @Secured({"ROLE_ADMIN"})
//     void removeUser(String userId);
// 
//     /**
//      * Search a user for search terms.
//      * @param searchTerm the search terms.
//      * @return a list of matches, or all if no searchTerm.
//      */
//     List<User> search(String searchTerm);
// 
//     /**
//      * Builds a recovery password url by replacing placeholders with username and generated recovery token.
//      *
//      * UrlTemplate should include two placeholders '{username}' for username and '{token}' for the recovery token.
//      *
//      * @param user
//      * @param urlTemplate
//      *            template including two placeholders '{username}' and '{token}'
//      * @return
//      */
//     String buildRecoveryPasswordUrl(User user, String urlTemplate);
// 
//     /**
//      *
//      * @param user
//      * @return
//      */
//     String generateRecoveryToken(User user);
// 
//     /**
//      *
//      * @param username
//      * @param token
//      * @return
//      */
//     boolean isRecoveryTokenValid(String username, String token);
// 
//     /**
//      *
//      * @param user
//      * @param token
//      * @return
//      */
//     boolean isRecoveryTokenValid(User user, String token);
// 
//     /**
//      * Sends a password recovery email to username.
//      *
//      * @param username
//      * @param urlTemplate
//      *            url template including two placeholders '{username}' and '{token}'
//      */
//     void sendPasswordRecoveryEmail(String username, String urlTemplate);
// 
//     /**
//      *
//      * @param username
//      * @param currentPassword
//      * @param recoveryToken
//      * @param newPassword
//      * @param applicationUrl
//      * @return
//      * @throws UserExistsException
//      */
//     User updatePassword(String username, String currentPassword, String recoveryToken, String newPassword, String applicationUrl) throws UserExistsException;
// }


import com.raibledesigns.service.UserManager;
import org.junit.Ignore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
package com.raibledesigns.service.impl;


/**
 * 
 * @author ivangsa
 * 
 */
@Ignore("create table password_reset_token before running this test")
public class PersistentPasswordTokenManagerTest extends PasswordTokenManagerTest {

    @Autowired
    @Qualifier("persistentPasswordTokenManager.userManager")
// Path: src/main/java/com/raibledesigns/service/UserManager.java
// public interface UserManager extends GenericManager<User, Long> {
//     /**
//      * Convenience method for testing - allows you to mock the DAO and set it on an interface.
//      * @param userDao the UserDao implementation to use
//      */
//     void setUserDao(UserDao userDao);
// 
//     /**
//      * Convenience method for testing - allows you to mock the PasswordEncoder and set it on an interface.
//      * @param passwordEncoder the PasswordEncoder implementation to use
//      */
//     void setPasswordEncoder(PasswordEncoder passwordEncoder);
// 
// 
//     /**
//      * Retrieves a user by userId.  An exception is thrown if user not found
//      *
//      * @param userId the identifier for the user
//      * @return User
//      */
//     User getUser(String userId);
// 
//     /**
//      * Finds a user by their username.
//      * @param username the user's username used to login
//      * @return User a populated user object
//      * @throws org.springframework.security.core.userdetails.UsernameNotFoundException
//      *         exception thrown when user not found
//      */
//     User getUserByUsername(String username) throws UsernameNotFoundException;
// 
//     /**
//      * Retrieves a list of all users.
//      * @return List
//      */
//     @Secured({"ROLE_ADMIN"})
//     List<User> getUsers();
// 
//     /**
//      * Saves a user's information.
//      *
//      * @param user the user's information
//      * @throws UserExistsException thrown when user already exists
//      * @return user the updated user object
//      */
//     @Transactional(rollbackOn = UserExistsException.class)
//     User saveUser(User user) throws UserExistsException;
// 
//     /**
//      * Removes a user from the database
//      *
//      * @param user the user to remove
//      */
//     void removeUser(User user);
// 
//     /**
//      * Removes a user from the database by their userId
//      *
//      * @param userId the user's id
//      */
//     @Secured({"ROLE_ADMIN"})
//     void removeUser(String userId);
// 
//     /**
//      * Search a user for search terms.
//      * @param searchTerm the search terms.
//      * @return a list of matches, or all if no searchTerm.
//      */
//     List<User> search(String searchTerm);
// 
//     /**
//      * Builds a recovery password url by replacing placeholders with username and generated recovery token.
//      *
//      * UrlTemplate should include two placeholders '{username}' for username and '{token}' for the recovery token.
//      *
//      * @param user
//      * @param urlTemplate
//      *            template including two placeholders '{username}' and '{token}'
//      * @return
//      */
//     String buildRecoveryPasswordUrl(User user, String urlTemplate);
// 
//     /**
//      *
//      * @param user
//      * @return
//      */
//     String generateRecoveryToken(User user);
// 
//     /**
//      *
//      * @param username
//      * @param token
//      * @return
//      */
//     boolean isRecoveryTokenValid(String username, String token);
// 
//     /**
//      *
//      * @param user
//      * @param token
//      * @return
//      */
//     boolean isRecoveryTokenValid(User user, String token);
// 
//     /**
//      * Sends a password recovery email to username.
//      *
//      * @param username
//      * @param urlTemplate
//      *            url template including two placeholders '{username}' and '{token}'
//      */
//     void sendPasswordRecoveryEmail(String username, String urlTemplate);
// 
//     /**
//      *
//      * @param username
//      * @param currentPassword
//      * @param recoveryToken
//      * @param newPassword
//      * @param applicationUrl
//      * @return
//      * @throws UserExistsException
//      */
//     User updatePassword(String username, String currentPassword, String recoveryToken, String newPassword, String applicationUrl) throws UserExistsException;
// }


// Path: src/test/java/com/raibledesigns/service/impl/PersistentPasswordTokenManagerTest.java
import com.raibledesigns.service.UserManager;
import org.junit.Ignore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

package com.raibledesigns.service.impl;


/**
 * 
 * @author ivangsa
 * 
 */
@Ignore("create table password_reset_token before running this test")
public class PersistentPasswordTokenManagerTest extends PasswordTokenManagerTest {

    @Autowired
    @Qualifier("persistentPasswordTokenManager.userManager")
    public void setUserManager(UserManager userManager) {