composite pattern test