public void test01Modify() throws Exception {
if(log.isDebugEnabled()) log.debug("*** test01Modify ***");
List applications = new ArrayList();
Collection resources =new TreeSet(new ResourceNameComparator());
Collection attributes = new TreeSet(new AttributeNameComparator());
Attribute attribute = new Attribute("attribute");
String currentAttribute = attribute.getId();
Resource resource = new Resource("test");
String currentResource = resource.getId();
Application application = new Application("test");
attributes.add(attribute);
resource.setAttributes(attributes);
resources.add(resource);
application.setResources(resources);
applications.add(application);
attribute.setInputOutput("1");
Application a = applicationService.get(application.getId(), applications);
Resource r = resourceService.get(resource.getId(),a);
attributeService.save(attribute,r);
Attribute attr=attributeService.get(currentAttribute,r);
assertTrue("must be same object",attr.equals(attribute));
assertEquals("name must be equals to attribute","attribute",attr.getName());
assertEquals("InpuOutput must be equals to 1","1",attr.getInputOutput());
assertEquals("attribute must be equals to attribute","attribute",attributeService.get(currentAttribute, resource).getName());
assertEquals("InpuOutput must be equals to 1","1",attributeService.get(currentAttribute, resource).getInputOutput());
}