Added test for sparse matrix representation.