Solution (source code)

= Solution

With $\ell_n(\theta)=\sum_i\log f(X_i,\theta)$, define the likelihood-ratio statistic
$$
\boxed{\Lambda_n
=2\{\ell_n(\widehat\theta_n)-\ell_n(\theta_0)\}}.
$$
Wilks' theorem gives $\Lambda_n\Rightarrow\chi_p^2$ under $H_0$, so reject when
$$
\Lambda_n>c_{p,\alpha}.
$$
This again has asymptotic type-I error $\alpha$.