1
下面的代碼導致org.mockito.exceptions.misusing.MissingMethodInvocationException時:MissingMethodInvocationException嘲諷一個org.apache.log4j.Level類
Level level = mock(Level.class);
IOException ioException = new IOException("test");
when(level.getSyslogEquivalent()).thenThrow(ioException);