In this paper we investigate the problem of detecting a change in the drift parameters of a generalized Ornstein–Uhlenbeck process which is defined as the solution of
$$\begin{aligned} dX_t=(L(t)-\alpha X_t) dt + \sigma dB_t \end{aligned}$$
and which is observed in continuous time. We derive an explicit representation of the generalized likelihood ratio test statistic assuming that the mean reversion function \(L(t)\) is a finite linear combination of known basis functions. In the case of a periodic mean reversion function, we determine the asymptotic distribution of the test statistic under the null hypothesis.