Since this fn is only used by unit tests, should it perhaps be in a unit test util file and not loaded into the prod app?