@Test
public void saveMDerAttribute() {
Membership owner = membershipDAO.find(1L);
assertNotNull("did not get expected user", owner);
MDerAttr derAttr = new MDerAttr();
derAttr.setOwner(owner);
derAttr.setTemplate(owner.getSyncopeRole().getAttrTemplate(MDerAttrTemplate.class, "mderiveddata"));
derAttr = derAttrDAO.save(derAttr);
assertNotNull(derAttr.getTemplate());
MDerAttr actual = derAttrDAO.find(derAttr.getId(), MDerAttr.class);
assertNotNull("expected save to work", actual);
assertEquals(derAttr, actual);
MAttrValue sx = (MAttrValue) owner.getAttr("mderived_sx").getValues().iterator().next();
MAttrValue dx = (MAttrValue) owner.getAttr("mderived_dx").getValues().iterator().next();