This paper shows how to increase the power of Hausmans (1978) specification test as well as the difference test in a large class of models. The idea is to impose the restrictions of the null and the alternative hypotheses when estimating the covariance matrix. If the null hypothesis is true then the proposed test has the same distribution as the existing ones in large samples. If the hypothesis is false then the proposed test statistic is larger with probability approaching one as the sample size increases in several important applications, including testing for endogeneity in the linear model.