Add a unit test for aggregateNeighbors