Mock factory method to create magic stubs.