The recommended approach for managed apps (meaning .NET) is probably dependency injection. If you want to test a component with fallible methods, write an interface wrapper and inject a fallible mock. The JIT will do dynamic PGO and devirtualize in normal application usage.