Add integration test for aggregate command