I found a couple of questions on this site (Most powerful test of simple vs. simple in $\mathrm{Unif}[0, \theta]$ and UMP for $U(0,\theta)$ (simple x simple hypothesis)) that are similar to my problem, but I don't understand enough about hypothesis testing to translate the discussion in those links to my situation.
Problem:
Let $Y_1, \dots, Y_n$ be a random sample from a uniform distribution on the interval $[0, \theta]$ where $\theta > 0$ is unknown. Find the most powerful test for the null hypothesis $H_0 \colon \theta = 1$ against the alternative hypothesis $H_1 \colon \theta = 4$ which never rejects a true null hypothesis. Find the power of this most powerful test when $n = 4$.
My attempt:
I initially considered the ratio of likelihoods $\dfrac{L_{\boldsymbol{Y}}(\theta_1 ; \boldsymbol{Y})}{L_{\boldsymbol{Y}}(\theta_0 ; \boldsymbol{Y})}$ but this didn't seem to lead anywhere. Then I decided to use the following test, based purely on intuition: reject $H_0$ if and only if the sample maximum $Y_{(n)} > 1$.
It is my understanding that this test is actually uniformly most powerful for the composite alternative $H_1^{\prime} \colon \theta > 1$ because the rejection region does not depend on the value of $\theta_1$ ($4$ in this case). Therefore the test must certainly be most powerful for the null and alternative hypotheses as stated in the problem.
I am pretty sure the test will never reject a true null hypothesis (i.e. has size zero) because, well, by construction it will only reject $H_0$ when the sample maximum is greater than $1$, which means that $H_0$ must be false.
As for the power of the test, I reason as follows (note that according to my course notes, the phrase "power of the test" refers to the value of the function $\beta(\theta) = P( \text{reject } H_0)$ in the situation that $H_1$ is true):
\begin{align} \text{Power of the test} &= P( \text{reject } H_0)\\ &= P( Y_{(n)} > 1)\\ &= 1 - F_{Y_{(n)}}(1)\\ &= 1 - \left( \frac{1}{4} \right)^{\!\!4} \text{ (plugging in d.f. of } Y_{(n)} \text{ when } n = 4 \text{ and } H_1 \text{ is true)}\\ &= \frac{255}{256}. \end{align}
Question:
Is this solution correct?
Thanks.