I am trying to find the UMP test for the following question:
Let X be a sample of size 1 from a Lebesgue pdf $f_{\theta}$. Find a UMP test of size $\alpha$ for
$$H_{o}:\theta=\theta_{0} \hspace{5mm} H_{1}:\theta=\theta_{1}$$
when $$f_{\theta}(x)=2\theta^{-2}(\theta-x)I_{(0,\theta)}(x), \hspace{4mm} \theta_0<\theta_1$$
I propose the following test
$$T(X) = \begin{cases} 1 & \theta_0<X<\theta_1 \\ \gamma & X<\theta_0\\ \end{cases}$$ where $\gamma=\alpha$ to get the desired size.
I reject $\theta=\theta_0$ with prob 1 when $\theta_0<X<\theta_1$ because it is not possible that our observation was produced from a r.v with $f_{\theta_0}$ distribution due to the support constraint. For the boundary randomization is required and therefore since $X\sim f_{\theta_0}$ is a proper r.v then $P_{\theta_0}(X<\theta_0)=1$ and since $P_{\theta_0}(\theta_0<X<\theta_1)=0$ then $\gamma=\alpha$ to get desired size. Is this correct?
The alternative hypothesis is basically $H_1:\theta>\theta_0$. This is equivalently expressed as $H_1:\theta=\theta_1(>\theta_0)$ where $\theta_1$ is just an arbitrary value of $\theta$ under $H_1$. But as UMP test is most powerful against every possible alternative, your test cannot depend on the specific choice of $\theta_1$.
For $\theta_1>\theta_0$, you have
\begin{align} \frac{f_{\theta_1}(x)}{f_{\theta_0}(x)}&=\left(\frac{\theta_0}{\theta_1}\right)^2\left(\frac{\theta_1-x}{\theta_0-x}\right)\frac{\mathbf1_{0<x<\theta_1}}{\mathbf1_{0<x<\theta_0}} \\&=\begin{cases} \left(\frac{\theta_0}{\theta_1}\right)^2\left(\frac{\theta_1-x}{\theta_0-x}\right) &,\text{ if }0<x<\theta_0 \\\infty &,\text{ if }\theta_0<x<\theta_1 \end{cases} \end{align}
When $0<x<\theta_0<\theta_1$,
$$\frac{\theta_1-x}{\theta_0-x}=1+\frac{\theta_1-\theta_0}{\theta_0-x}$$
And as $x$ increases, $\theta_0-x$ decreases, so that $\frac{\theta_1-\theta_0}{\theta_0-x}$ increases.
Therefore the ratio $f_{\theta_1}/f_{\theta_0}$ is increasing in $x$, which gives you a most powerful test using Neyman-Pearson lemma. Show that this test does not depend on $\theta_1$, which is then a UMP test by definition.
Alternatively, since $f_{\theta}$ has monotone likelihood ratio you can also apply Karlin-Rubin theorem directly.