This approach is O(N).  Instead, we could index the proxies by their class as they are created in a hash, and then do an O(1) lookup here.  It would almost certainly be faster for any examples that use lots of mock proxies.  It could potentially be slower for examples that use a small number of mock proxies, though...and that might be the more common case.  Thoughts?