### Question:
GroupServiceImpl extends ServiceImpl<GroupMapper, GroupDO> implements GroupService { @Override public List<GroupDO> getUserGroupsByUserId(Long userId) { return this.baseMapper.selectUserGroups(userId); }  @Override List<GroupDO> getUserGroupsByUserId(Long userId); @Override List<Long> getUserGroupIdsByUserId(Long userId); @Override IPage<GroupDO> getGroupPage(long page, long count); @Override boolean checkGroupExistById(Long id); @Override GroupPermissionsBO getGroupAndPermissions(Long id); @Override boolean checkGroupExistByName(String name); @Override boolean checkIsRootByUserId(Long userId); @Override boolean deleteUserGroupRelations(Long userId, List<Long> deleteIds); @Override boolean addUserGroupRelations(Long userId, List<Long> addIds);  }### Answer:
@Test public void getUserGroupsByUserId() { Long id = mockData(); List<GroupDO> groups = groupService.getUserGroupsByUserId(id); assertTrue(groups.size() > 0); boolean anyMatch = groups.stream().anyMatch(it -> it.getName().equals("测试分组12")); assertTrue(anyMatch); }