### Question:
AlertGroupService extends BaseService { public HashMap<String, Object> queryAlertgroup() { HashMap<String, Object> result = new HashMap<>(); List<AlertGroup> alertGroups = alertGroupMapper.queryAllGroupList(); result.put(Constants.DATA_LIST, alertGroups); putMsg(result, Status.SUCCESS); return result; }  HashMap<String, Object> queryAlertgroup(); Map<String, Object> listPaging(User loginUser, String searchVal, Integer pageNo, Integer pageSize); Map<String, Object> createAlertgroup(User loginUser, String groupName, AlertType groupType, String desc); Map<String, Object> updateAlertgroup(User loginUser, int id, String groupName, AlertType groupType, String desc); @Transactional(rollbackFor = RuntimeException.class) Map<String, Object> delAlertgroupById(User loginUser, int id); Map<String, Object> grantUser(User loginUser, int alertgroupId, String userIds); boolean existGroupName(String groupName);  }### Answer:
@Test public void testQueryAlertGroup(){ Mockito.when(alertGroupMapper.queryAllGroupList()).thenReturn(getList()); HashMap<String, Object> result= alertGroupService.queryAlertgroup(); logger.info(result.toString()); List<AlertGroup> alertGroups = (List<AlertGroup>) result.get(Constants.DATA_LIST); Assert.assertTrue(CollectionUtils.isNotEmpty(alertGroups)); }