Add tests for nested groups