This is exercise 8.46 in Casella Berger. Let $X_1,\dots,X_n$ be a random sample from a $N(\theta,\sigma^2)$ population. Consider testing $$H_0: \theta_1\leq\theta\leq\theta_2\text{ versus } H_1:\theta<\theta_1 \text{ or } \theta>\theta_2$$ Show that for an appropriately chosen constant $k$, a size $\alpha$ test can be given by $$\text{reject } H_0 \text{ if } |\bar{X}-\bar{\theta}|>k\sqrt{S^2/n}$$ where $\bar{\theta}=(\theta_1+\theta_2)/2$.
My attempt shows that $k=(t_{n-1,1-a}+t_{n-1,1-b})/2$ as long as $a,b\in(0,\alpha)$ and $a+b=\alpha$, but I also feel like $k$ is unique. Also I need to show my test is unbiased. How to I proceed? Any help would be appreciated. Thank you!