I have a try catch block in UI component’s controller class. The catch block catches IOException thrown by FXMLLoader’s static ‘load()’ method, I think.
The exception is caught, logged using logger + shown to user in the form of a custom alert.
I’ve tried using mockito and mocking fxml loader’s static load() method alongside TestFx for Junit5… but nothing seems to work.
How does one test for IOException thrown as a result of user interaction?