Stubbing out core methods and classes