bholota
08/23/2017, 11:38 AMContext
. It’s kinda same problem when you want to change Resources
locale etc. You can create new Context
with new configuration, with custom locale and it will return proper Resources
but you have to inject it manually like @Paul Woitaschek proposed.
Imho you should wrap your system service in some abstraction, it should make your testing easier and it’s good practice.