correct test registry hooking in layer