add unit test for nesting composite objects