If the only thing you want is to test if all those error messages are correctly customized, there is a way more efficient solution to this than to invest weeksmonths of work to create test scenarios for each and every error situation, just to make the application show the customized text by a "real" error:. Instead,
- ask the engineering team to provide some additional, simple, "test customize error texts" feature which allows to display each available error message from the resources on a screen or dialog similar to the screen or form of similar size and style as the dialog or form where it would be displayed regularly, in case an error occuredoccurs.
- maybe thisask them to build the feature in a way so it will also allow to switch quickly between the original text and the customized text for comparison purposes.
That will avoid any necessity to change theany code fromlike the example abovesnippet from your question, it will avoid the necessity to mock out that proxy, and it will make it easier by an order of magnitude for you as(as well as for QA) to test all customizations. And, as a bonus, it will become trivial to test the customization of error texts which are normally part ofwould otherwise show up only in (almost) unreachable code.
 
                