Add unit test for Sparse_matrix