Build a Mocking Framework with the Stub API. Apex provides a stub API for implementing a mocking framework. … You can define the behavior of stub objects, which are created at runtime as anonymous subclasses of Apex classes. The stub API comprises the System