adding unit test for aggregate methods