DefaultUserServiceAdapter implements UserServiceAdapter { @Override public boolean validateUser(String username, String password) { User user = this.userCurator.findByLogin(username); String hashedPassword = Util.hash(password); if (user != null && password != null && hashedPassword != null) { return hashedPassword.equals(user.getHashedPassword()); } return false; } @Inject  DefaultUserServiceAdapter(UserCurator userCurator, RoleCurator roleCurator,
        PermissionBlueprintCurator permissionCurator, OwnerCurator ownerCurator,
        PermissionFactory permissionFactory); @Override UserInfo createUser(UserInfo user); @Override UserInfo updateUser(String username, UserInfo user); @Override List<? extends UserInfo> listUsers(); @Override boolean validateUser(String username, String password); @Override void deleteUser(String username); @Override UserInfo findByLogin(String login); @Override Collection<? extends OwnerInfo> getAccessibleOwners(String username); @Override RoleInfo createRole(RoleInfo role); @Override RoleInfo updateRole(String roleName, RoleInfo role); @Override RoleInfo addUserToRole(String roleName, String username); @Override RoleInfo removeUserFromRole(String roleName, String username); @Override RoleInfo addPermissionToRole(String roleName, PermissionBlueprintInfo permission); @Override RoleInfo removePermissionFromRole(String roleName, String permissionId); @Override void deleteRole(String role); @Override RoleInfo getRole(String roleName); @Override List<? extends RoleInfo> listRoles();  }
@Test public void validationNoUser() { assertFalse(this.service.validateUser("not_here", "candlepin")); }
@Test public void validationNullsAllAround() { assertFalse(this.service.validateUser(null, null)); }