방법

// obviously fails:
assertThatCode(() -> { throw new Exception("boom!"); }).doesNotThrowAnyException();

참고 자료