@Test public void reset() throws FileNotFoundException { final RGraphicsState state = mock(RGraphicsState.class); when(state.current()).thenThrow(FileNotFoundException.class); final RGraphicsPanel panel = new RGraphicsPanel(state); try { panel.refresh(); } catch (final AssertionError ignore) { /* state.current() generates FileNotFoundException, panel catches it and logs as error, but logger generates AssertionError with FileNotFoundException as a cause */ } verify(state, times(1)).current(); panel.reset(); verifyNoMoreInteractions(state); }