Hi! What would be the best way to implement a stub of the form “throw X, when Y” in a unit test? In Java with Mockito, this would be the equivalent https://static.javadoc.io/org.mockito/mockito-core/2.7.19/org/mockito/Mockito.html#12
If you know of any lib/framework that already does this, it would be great 🙂
I finally managed to implement it using with-redefs
. It works well but is not very elegant imo.