@Test public void testFailedWhenSystemExceptionAndErrorCauseExistsShouldLogErrorAtErrorLevel() { //GIVEN State state = Mockito.mock(State.class); SystemException exception = new SystemException(ERR_MSG); Throwable cause = new Throwable(); exception.initCause(cause); //WHEN underTest.failed(state, exception); //THEN verify(logger).error(FAILED_MESSAGE, exception); }