Add tests for aggregates with inheritance