Mockito verify after exception Junit 4.10
问题 I am testing a method with an expected exception. I also need to verify that some cleanup code was called (on a mocked object) after the exception is thrown, but it looks like that verification is being ignored. Here is the code. I am using the Junit ExpectedException Rule to verify the expected exception. @Rule public ExpectedException expectedEx = ExpectedException.none(); @Test public void testExpectedException() { MockedObject mockObj = mock(MockedObj.class); MySubject subject = new