DEV: add test for matrix inversion