I am trying to unit test my READ operations and I want to mock my READ call to throw a DocumentNotFoundException. However, all the methods inside the exception are protected or private making it impossible to mockk anything.
Thanks! The constructor is public but I was finding it difficult to mock ErrorContext which is an arg to the constructor. I had to mock errorContext.exportAsString(any()) for it to work!