Correlation matrix test made generic