Generalized likelihood ratio in uniform distribution My question is to come up with the form of the GLR when testing the following:

Let $X_1,\ldots, X_n$ be a random sample from a distribution with pdf $f(x;\theta,\mu) = \frac{1}{2\theta}$ if $|x-\mu|$ $\leq$
$\theta$ and zero otherwise. Test $H_0 : \mu=0$ vs $H_1: \mu \neq 0$. Show that the GLR $\lambda = \lambda(X_1, ..., X_n)$ is given by $\lambda^\frac{1}{n}$ = 
  $\frac{X_{n:n}-X_{1:n}}{2\max\{{-X_{1:n},X_{n:n}}\}}$.

I don't get how the max of the negative of the smallest sample, and the largest sample get to the denominator. Also why the maximum of them. The GLR has the likelihood at the mle at the denominator. But when I tried to find the mle, it seems that the mle of $\mu$ has to be bounded by the smallest (i.e. $X_{1:n}$) and the largest (i.e. $X_{n:n})$, but I not sure how the likelihood at the mle would become $2\max\{{-X_{1:n},X_{n:n}}\}$.
 A: $X_1,\ldots,X_n$ is a sample from $U(\mu-\theta,\mu+\theta)$ distribution.
So the likelihood function given $x=(x_1,\ldots,x_n)$ is 
\begin{align}
L(\mu,\theta\mid x)&=\prod_{i=1}^n\frac{1}{2\theta}1_{\mu-\theta<x_i<\mu+\theta}
\\&=\frac{1}{(2\theta)^n}1_{\mu-\theta<x_{(1)},x_{(n)}<\mu+\theta}\,,
\end{align}
where $x_{(1)}=\min\limits_{i\le i\le n}x_i$ and $x_{(n)}=\max\limits_{1\le i\le n}x_i$.
The LRT statistic for testing $H_0$ vs $H_1$ is 
\begin{align}
\Lambda(x)&=\frac{\sup_{\mu=0,\tilde\theta}L(\mu,\theta\mid x)}{\sup_{\mu,\theta}L(\mu,\theta\mid x)}
\\&=\frac{L(0,\tilde\theta\mid x)}{L(\hat\mu,\hat\theta\mid x)}\,,
\end{align}
where $\tilde\theta$ is the restricted MLE of $\theta$ when $\mu=0$ and $(\hat\mu,\hat\theta)$ is the unrestricted MLE of $(\mu,\theta)$.
The restricted MLE is derived here, showing $$\tilde\theta=\max_{1\le i\le n}|x_i|=\max\{-x_{(1)},x_{(n)}\}$$
And the unrestricted MLE is given by $$\hat\mu=\frac{x_{(1)}+x_{(n)}}{2}\quad,\quad\hat\theta=\frac{x_{(n)}-x_{(1)}}{2}$$
