Added tests for Mat