A good unit test is that the covariance does not change if the weights are all scaled by the same value.