@Before public void setup() { MockitoAnnotations.initMocks(this); doThrow(new TestException("Exception Message")) .when(exceptionThrowingModule).process(anyString()); exceptionCatcher = new ObjectExceptionCatcher<>(); exceptionCatcher.setReceiver(exceptionThrowingModule); }