I apologize if this question is very basic. I have the following plain vanilla Instrumental Variable model.
$Y=\alpha+X\beta+\varepsilon$
$X=\delta+Z\gamma+\eta$
$\varepsilon\perp\eta,\quad Z\perp\eta \quad$ true
I am interested in testing $\varepsilon\perp X$, that is, whether X is a valid instrument for the first equation (very informally stated, one might say I want to test whether $X$ is exogenous, or whether I need to instrument $X$ with $Z$)
My idea is: estimate the IV model using 2SLS or GMM, using both $X$ and $Z$ as instruments, and then perform a Sargan/Hansen test. My guess is that the test's power will depend on how strongly $Z$ predictx $X$ (that is, on how relevant of an instrument $Z$ is for $X$). In 2SLS, the first stage will fit perfectly and the test will be basically a test of whether the OLS residual are orthogonal to $Z$. Is this reasoning correct? Is the Sargan/Hansen test a valid test for $ \varepsilon\perp X$?