Software AG Products 10.7 | Unit Test Framework | Unit Test Framework | Terms and Concepts | Exception Mock
 
Exception Mock
An exception mock is used to return an error or exception to the calling service and can be useful for testing error handling in a service. As with the other mocks described, any call to the service defined in the mock is intercepted and the exception defined in the mock is returned instead. This kind of mock is useful to simulate behavior that can cause exceptions in the normal flow.