Collapse a captured exception and its assertThat into assertThatThrownBy
MSALReplace an exception captured with JUnit's assertThrows or AssertJ's assertThatExceptionOfType(..).isThrownBy(..).actual(), and only used in the assertThat statement that follows, with a single assertThatThrownBy(..).isInstanceOf(..) chain.
org. openrewrite. java. testing. assertj. CollapseThrownExceptionAssertThatmod run . --recipe= org. openrewrite. java. testing. assertj. CollapseThrownExceptionAssertThatInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.