assertNotNull(t);
}
@Test
public void update() {
DerivedSchemaTO schema = schemaService.read(AttributableType.MEMBERSHIP, SchemaType.DERIVED,
"mderiveddata");
assertNotNull(schema);
assertEquals("mderived_sx + '-' + mderived_dx", schema.getExpression());
try {
schema.setExpression("mderived_sx + '.' + mderived_dx");
schemaService.update(AttributableType.MEMBERSHIP, SchemaType.DERIVED,
schema.getName(), schema);
schema = schemaService.read(AttributableType.MEMBERSHIP, SchemaType.DERIVED, "mderiveddata");
assertNotNull(schema);
assertEquals("mderived_sx + '.' + mderived_dx", schema.getExpression());
} finally {
// Set updated back to make test re-runnable
schema.setExpression("mderived_sx + '-' + mderived_dx");
schemaService.update(AttributableType.MEMBERSHIP, SchemaType.DERIVED,
schema.getName(), schema);
}
}