### Question:
UsersService extends BaseService { public User queryUser(int id) { return userMapper.selectById(id); }  @Transactional(rollbackFor = Exception.class) Map<String, Object> createUser(User loginUser,
                                          String userName,
                                          String userPassword,
                                          String email,
                                          int tenantId,
                                          String phone,
                                          String queue,
                                          int state); @Transactional(rollbackFor = RuntimeException.class) User createUser(String userName,
                                          String userPassword,
                                          String email,
                                          int tenantId,
                                          String phone,
                                          String queue,
                                          int state); User queryUser(int id); User queryUser(String name); User queryUser(String name, String password); int getUserIdByName(String name); Map<String, Object> queryUserList(User loginUser, String searchVal, Integer pageNo, Integer pageSize); Map<String, Object> updateUser(int userId,
                                          String userName,
                                          String userPassword,
                                          String email,
                                          int tenantId,
                                          String phone,
                                          String queue,
                                          int state); Map<String, Object> deleteUserById(User loginUser, int id); @Transactional(rollbackFor = RuntimeException.class) Map<String, Object> grantProject(User loginUser, int userId, String projectIds); @Transactional(rollbackFor = RuntimeException.class) Map<String, Object> grantResources(User loginUser, int userId, String resourceIds); @Transactional(rollbackFor = RuntimeException.class) Map<String, Object> grantUDFFunction(User loginUser, int userId, String udfIds); @Transactional(rollbackFor = RuntimeException.class) Map<String, Object> grantDataSource(User loginUser, int userId, String datasourceIds); Map<String, Object> getUserInfo(User loginUser); Map<String, Object> queryAllGeneralUsers(User loginUser); Map<String, Object> queryUserList(User loginUser); Result verifyUserName(String userName); Map<String, Object> unauthorizedUser(User loginUser, Integer alertgroupId); Map<String, Object> authorizedUser(User loginUser, Integer alertgroupId); @Transactional(rollbackFor = RuntimeException.class) Map<String, Object> registerUser(String userName, String userPassword, String repeatPassword, String email); Map<String, Object> activateUser(User loginUser, String userName); Map<String, Object> batchActivateUser(User loginUser, List<String> userNames);  }### Answer:
@Test public void testQueryUser(){ String userName = "userTest0001"; String userPassword = "userTest0001"; when(userMapper.queryUserByNamePassword(userName,EncryptionUtils.getMd5(userPassword))).thenReturn(getGeneralUser()); User queryUser = usersService.queryUser(userName, userPassword); logger.info(queryUser.toString()); Assert.assertTrue(queryUser!=null); }