Fixed autowiring issues with persistence tests