When the reference distribution is some arbitrary distribution q \in \simplex{k} instead of the uniform distribution, the problem is described as identity testing. The rest of the setup is the same. Thus uniformity testing is a specific example of identity testing. It turns out that if you have an algorithm for uniformity testing, you get one for identity testing for free.
If you have an (\eps)-uniformity tester with sample complexity s(n, \eps), then you can construct an (\eps) identity tester with sample complexity s(6n, \eps/3)
The original proof can be found in (Goldreich, 2016). I was able to re-derive the results here.