Issue #3118477 by mondrake, Mile23: RegistryTest, RegistryLegacyTest both define the same class, use mock instead (cherry picked from commit 0a65cd60)