Since the aggregation command is always the same, why not initialize the command array once at the start of the test and just re-use it for each of the three test cases?