### Question:
ResourceService { public void saveOrUpdate(ResourceDto resourceDto) { resourceDao.save(resourceMapper.toEntity(resourceDto)); List<RoleResource> roleResources = resourceDto.getRoles().stream() .map(resource -> new RoleResource(resource.getId(), resourceDto.getId())) .collect(Collectors.toList()); roleResourceDao.deleteByRoleIdIn(Collections.singletonList(resourceDto.getId())); roleResourceDao.saveAll(roleResources); } @Autowired  ResourceService(ResourceDao resourceDao,
	                       RoleResourceDao roleResourceDao,
	                       ResourceMapper resourceMapper); List<ResourceDto> findResourceByCondition(ResourceDto resourceDto, QueryVO queryVO); ResourceDto findResourceById(String resId); Set<ResourceDto> findResourceByRoleIds(List<String> resId); void saveOrUpdate(ResourceDto resourceDto); void deleteByIds(List<String> resId);  }### Answer:
@Test public void saveOrUpdate() { ResourceDto resource = new ResourceDto(); resource.setName("1234"); resource.setDescription("描述"); resourceService.saveOrUpdate(resource); }