Improved testability for LazyEntityReference