@Test
public void saveRDerAttribute() {
SyncopeRole owner = roleDAO.find(1L);
assertNotNull("did not get expected user", owner);
RDerAttr derAttr = new RDerAttr();
derAttr.setOwner(owner);
derAttr.setTemplate(owner.getAttrTemplate(RDerAttrTemplate.class, "rderiveddata"));
derAttr = derAttrDAO.save(derAttr);
assertNotNull(derAttr.getTemplate());
RDerAttr actual = derAttrDAO.find(derAttr.getId(), RDerAttr.class);
assertNotNull("expected save to work", actual);
assertEquals(derAttr, actual);
RAttrValue sx = (RAttrValue) owner.getAttr("rderived_sx").getValues().iterator().next();
RAttrValue dx = (RAttrValue) owner.getAttr("rderived_dx").getValues().iterator().next();