Add factories and a base mixin for functional tests that need ownership
Fix tests that failed due to ownership checks