//准备数据
User user = new User();
user.setLoginName("admin");
user.setShaPassword(new ShaPasswordEncoder().encodePassword("admin", null));
Role role1 = new Role();
role1.setName("admin");
Role role2 = new Role();
role2.setName("user");
user.getRoleList().add(role1);
user.getRoleList().add(role2);
//录制脚本
EasyMock.expect(mockAccountManager.findUserByLoginName("admin")).andReturn(user);