This method will be really nasty to mock due to the statics. Should we make this an injectable factory instead?