Characterizations and goodness-of-fit tests for multivariate normal and Cauchy distributions