add tests for covariancematrix panic