### Question:
ResourceServiceImpl implements ResourceService { public void updateResource(DJResource resource) { resourceDao.update(resource); }  void setSystemDao(SystemDao systemDao); void setResourceDao(ResourceDao resourceDao); DJResource findResourceByResourceId(Integer id); void insertResource(DJResource resource); void updateResource(DJResource resource);  }### Answer:
@Test public void testUpdateResource() throws Exception { DJResource resource = resourceService.findResourceByResourceId(2); DJSystem system = new DJSystem(); system.id=1; DJRole role = DomainUtil.getRole(); role.id=2; List<DJRole> roles = new ArrayList<DJRole>(); roles.add(role); resource.system=system; resource.roles=roles; resourceService.updateResource(resource); }