Unit testing for matrix row and column aggregation.