Add sparse matrix test.