I don't know what to do with this. It was previously used internally and by tests in two separate packages hence the duplication. I threw it here for now. Hopefully it will go away completely with further refactoring.