add tests for set_metadata in aggregate

Change-Id: I1aae38be9780e4f8c9e6bf595837c71f510fafce
Merge "add tests for set_metadata in aggregate"