Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade OpenRewrite Templating 1.20.1 -> 1.20.2 #1478

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

Picnic-DevPla-Bot
Copy link
Contributor

This PR contains the following updates:

Package Type Update Change
OpenRewrite Templating patch 1.20.1 -> 1.20.2
OpenRewrite Templating compile patch 1.20.1 -> 1.20.2

Release Notes

openrewrite/rewrite-templating (OpenRewrite Templating)

v1.20.2

Compare Source

What's Changed

Full Changelog: openrewrite/rewrite-templating@v1.20.1...v1.20.2


  • If you want to rebase/retry this PR, check this box

@Picnic-DevPla-Bot
Copy link
Contributor Author

Picnic-DevPla-Bot commented Dec 24, 2024

Suggested commit message:

Upgrade OpenRewrite Templating 1.20.1 -> 1.20.2 (#1478)

See:
- https://github.com/openrewrite/rewrite-templating/releases/tag/v1.20.2
- https://github.com/openrewrite/rewrite-templating/compare/v1.20.1...v1.20.2

@rickie
Copy link
Member

rickie commented Dec 24, 2024

Quite some changes (had to drop 70% of the diff as it was too large for a comment) :

I wanted to give generation a go, but it looks a bit different from how you do it @Stephan202 😂.

Details
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJBigDecimalRulesRecipes.java /tmp/recipes-before/AssertJBigDecimalRulesRecipes.java
35d34
<         //language=markdown
41,42c40
<         //language=markdown
<         return "Note that, contrary to collections of Refaster rules for other `org.assertj.core.api.NumberAssert` subtypes, these rules do not rewrite to/from `BigDecimalAssert#isEqualTo(Object)` and `BigDecimalAssert#isNotEqualTo(Object)`. This is\n because `BigDecimal#equals(Object)` considers not only the numeric value of compared\n instances, but also their scale. As a result various seemingly straightforward transformations\n would actually subtly change the assertion's semantics. [Source](https://error-prone.picnic.tech/refasterrules/AssertJBigDecimalRules).";
---
>         return "<p>Note that, contrary to collections of Refaster rules for other `org.assertj.core.api.NumberAssert` subtypes, these rules do not rewrite to/from `BigDecimalAssert#isEqualTo(Object)` and `BigDecimalAssert#isNotEqualTo(Object)`. This is\n because `BigDecimal#equals(Object)` considers not only the numeric value of compared\n instances, but also their scale. As a result various seemingly straightforward transformations\n would actually subtly change the assertion's semantics. [Source](https://error-prone.picnic.tech/refasterrules/AssertJBigDecimalRules).";
68d65
<             //language=markdown
74d70
<             //language=markdown
149d144
<             //language=markdown
155d149
<             //language=markdown
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJBigIntegerRulesRecipes.java /tmp/recipes-before/AssertJBigIntegerRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
71d68
<             //language=markdown
77d73
<             //language=markdown
152d147
<             //language=markdown
158d152
<             //language=markdown
233d226
<             //language=markdown
239d231
<             //language=markdown
299d290
<                             new UsesMethod<>("org.assertj.core.api.AbstractBigIntegerAssert isEqualTo(..)", true),
300a292
>                             new UsesMethod<>("org.assertj.core.api.AbstractBigIntegerAssert isEqualTo(..)", true),
327d318
<             //language=markdown
333d323
<             //language=markdown
393d382
<                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isNotEqualTo(..)", true),
394a384
>                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isNotEqualTo(..)", true),
421d410
<             //language=markdown
427d415
<             //language=markdown
487d474
<                             new UsesMethod<>("org.assertj.core.api.AbstractBigIntegerAssert isEqualTo(..)", true),
488a476
>                             new UsesMethod<>("org.assertj.core.api.AbstractBigIntegerAssert isEqualTo(..)", true),
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJBooleanRulesRecipes.java /tmp/recipes-before/AssertJBooleanRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
72d69
<             //language=markdown
78d74
<             //language=markdown
134d129
<             //language=markdown
140d134
<             //language=markdown
196d189
<             //language=markdown
202d194
<             //language=markdown
273,274d264
<                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isEqualTo(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isNotEqualTo(..)", true),
276c266,268
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isNotEqualTo(..)", true)
---
>                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isEqualTo(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isNotEqualTo(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isNotEqualTo(..)", true)
299d290
<             //language=markdown
305d295
<             //language=markdown
362d351
<             //language=markdown
368d356
<             //language=markdown
439,440d426
<                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isEqualTo(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isNotEqualTo(..)", true),
442c428,430
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isNotEqualTo(..)", true)
---
>                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isEqualTo(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isNotEqualTo(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractAssert isNotEqualTo(..)", true)
465d452
<             //language=markdown
471d457
<             //language=markdown
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJByteRulesRecipes.java /tmp/recipes-before/AssertJByteRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
71d68
<             //language=markdown
77d73
<             //language=markdown
151d146
<             //language=markdown
157d151
<             //language=markdown
231d224
<             //language=markdown
237d229
<             //language=markdown
293d284
<             //language=markdown
299d289
<             //language=markdown
355d344
<             //language=markdown
361d349
<             //language=markdown
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJCharSequenceRulesRecipes.java /tmp/recipes-before/AssertJCharSequenceRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
69d66
<             //language=markdown
75d71
<             //language=markdown
120d115
<                         new UsesMethod<>("java.lang.CharSequence length(..)", true),
121a117
>                         new UsesMethod<>("java.lang.CharSequence length(..)", true),
147d142
<             //language=markdown
153d147
<             //language=markdown
199d192
<                         new UsesMethod<>("java.lang.CharSequence length(..)", true),
200a194
>                         new UsesMethod<>("java.lang.CharSequence length(..)", true),
226d219
<             //language=markdown
232d224
<             //language=markdown
266d257
<                         new UsesMethod<>("java.lang.CharSequence length(..)", true),
268c259,260
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.lang.CharSequence length(..)", true)
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJDoubleRulesRecipes.java /tmp/recipes-before/AssertJDoubleRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
72d69
<             //language=markdown
78d74
<             //language=markdown
147d142
<             //language=markdown
153d147
<             //language=markdown
227d220
<             //language=markdown
233d225
<             //language=markdown
307d298
<             //language=markdown
313d303
<             //language=markdown
369d358
<             //language=markdown
375d363
<             //language=markdown
431d418
<             //language=markdown
437d423
<             //language=markdown
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJFloatRulesRecipes.java /tmp/recipes-before/AssertJFloatRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
72d69
<             //language=markdown
78d74
<             //language=markdown
147d142
<             //language=markdown
153d147
<             //language=markdown
227d220
<             //language=markdown
233d225
<             //language=markdown
307d298
<             //language=markdown
313d303
<             //language=markdown
369d358
<             //language=markdown
375d363
<             //language=markdown
431d418
<             //language=markdown
437d423
<             //language=markdown
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJIntegerRulesRecipes.java /tmp/recipes-before/AssertJIntegerRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
71d68
<             //language=markdown
77d73
<             //language=markdown
151d146
<             //language=markdown
157d151
<             //language=markdown
231d224
<             //language=markdown
237d229
<             //language=markdown
293d284
<             //language=markdown
299d289
<             //language=markdown
355d344
<             //language=markdown
361d349
<             //language=markdown
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJLongRulesRecipes.java /tmp/recipes-before/AssertJLongRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
71d68
<             //language=markdown
77d73
<             //language=markdown
151d146
<             //language=markdown
157d151
<             //language=markdown
231d224
<             //language=markdown
237d229
<             //language=markdown
293d284
<             //language=markdown
299d289
<             //language=markdown
355d344
<             //language=markdown
361d349
<             //language=markdown
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJNumberRulesRecipes.java /tmp/recipes-before/AssertJNumberRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
70d67
<             //language=markdown
76d72
<             //language=markdown
270,316c266,269
<                             new UsesType<>("java.math.BigDecimal", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigDecimalAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("java.math.BigInteger", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
<                             new UsesMethod<>("java.math.BigInteger valueOf(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("java.math.BigInteger", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractByteAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractByteAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractByteAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractByteAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractDoubleAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractDoubleAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractFloatAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractFloatAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractIntegerAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractIntegerAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractLongAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractLongAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractLongAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractLongAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
---
>                         new UsesType<>("java.math.BigInteger", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThan(..)", true)
>                     ),
318,320c271,275
<                             new UsesType<>("org.assertj.core.api.AbstractShortAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractShortAssert isGreaterThan(..)", true)
<                         ),
---
>                         new UsesType<>("java.math.BigInteger", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThanOrEqualTo(..)", true),
>                         new UsesMethod<>("java.math.BigInteger valueOf(..)", true)
>                     ),
322,324c277,280
<                             new UsesType<>("org.assertj.core.api.AbstractShortAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractShortAssert isGreaterThanOrEqualTo(..)", true)
<                         )
---
>                         new UsesType<>("java.math.BigDecimal", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigDecimalAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThan(..)", true)
>                     )
346d301
<             //language=markdown
352d306
<             //language=markdown
546,592c500,503
<                             new UsesType<>("java.math.BigDecimal", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigDecimalAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractBigDecimalAssert isLessThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("java.math.BigInteger", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
<                             new UsesMethod<>("java.math.BigInteger valueOf(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("java.math.BigInteger", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractByteAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractByteAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractByteAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractByteAssert isLessThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractDoubleAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractDoubleAssert isLessThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractFloatAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractFloatAssert isLessThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractIntegerAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractIntegerAssert isLessThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractLongAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractLongAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractLongAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractLongAssert isLessThanOrEqualTo(..)", true)
<                         ),
---
>                         new UsesType<>("java.math.BigInteger", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThanOrEqualTo(..)", true)
>                     ),
594,596c505,509
<                             new UsesType<>("org.assertj.core.api.AbstractShortAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractShortAssert isLessThan(..)", true)
<                         ),
---
>                         new UsesType<>("java.math.BigInteger", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThan(..)", true),
>                         new UsesMethod<>("java.math.BigInteger valueOf(..)", true)
>                     ),
598,600c511,514
<                             new UsesType<>("org.assertj.core.api.AbstractShortAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractShortAssert isLessThanOrEqualTo(..)", true)
<                         )
---
>                         new UsesType<>("java.math.BigDecimal", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigDecimalAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractBigDecimalAssert isLessThanOrEqualTo(..)", true)
>                     )
622d535
<             //language=markdown
628d540
<             //language=markdown
822,868c734,737
<                             new UsesType<>("java.math.BigDecimal", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigDecimalAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("java.math.BigInteger", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
<                             new UsesMethod<>("java.math.BigInteger valueOf(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("java.math.BigInteger", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractByteAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractByteAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractByteAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractByteAssert isLessThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractDoubleAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractDoubleAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractFloatAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractFloatAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractIntegerAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractIntegerAssert isLessThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractLongAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractLongAssert isLessThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractLongAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractLongAssert isLessThanOrEqualTo(..)", true)
<                         ),
---
>                         new UsesType<>("java.math.BigInteger", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThan(..)", true)
>                     ),
870,872c739,743
<                             new UsesType<>("org.assertj.core.api.AbstractShortAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractShortAssert isLessThan(..)", true)
<                         ),
---
>                         new UsesType<>("java.math.BigInteger", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThanOrEqualTo(..)", true),
>                         new UsesMethod<>("java.math.BigInteger valueOf(..)", true)
>                     ),
874,876c745,748
<                             new UsesType<>("org.assertj.core.api.AbstractShortAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractShortAssert isLessThanOrEqualTo(..)", true)
<                         )
---
>                         new UsesType<>("java.math.BigDecimal", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigDecimalAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isLessThan(..)", true)
>                     )
898d769
<             //language=markdown
904d774
<             //language=markdown
1098,1144c968,971
<                             new UsesType<>("java.math.BigDecimal", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigDecimalAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractBigDecimalAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("java.math.BigInteger", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
<                             new UsesMethod<>("java.math.BigInteger valueOf(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("java.math.BigInteger", true),
<                             new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractByteAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractByteAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractByteAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractByteAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractDoubleAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractDoubleAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractFloatAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractFloatAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractIntegerAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractIntegerAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractIntegerAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractLongAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractLongAssert isGreaterThan(..)", true)
<                         ),
<                         Preconditions.and(
<                             new UsesType<>("org.assertj.core.api.AbstractLongAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractLongAssert isGreaterThanOrEqualTo(..)", true)
<                         ),
---
>                         new UsesType<>("java.math.BigInteger", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThanOrEqualTo(..)", true)
>                     ),
1146,1148c973,977
<                             new UsesType<>("org.assertj.core.api.AbstractShortAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractShortAssert isGreaterThan(..)", true)
<                         ),
---
>                         new UsesType<>("java.math.BigInteger", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigIntegerAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractComparableAssert isGreaterThan(..)", true),
>                         new UsesMethod<>("java.math.BigInteger valueOf(..)", true)
>                     ),
1150,1152c979,982
<                             new UsesType<>("org.assertj.core.api.AbstractShortAssert", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractShortAssert isGreaterThanOrEqualTo(..)", true)
<                         )
---
>                         new UsesType<>("java.math.BigDecimal", true),
>                         new UsesType<>("org.assertj.core.api.AbstractBigDecimalAssert", true),
>                         new UsesMethod<>("org.assertj.core.api.AbstractBigDecimalAssert isGreaterThanOrEqualTo(..)", true)
>                     )
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJPrimitiveRulesRecipes.java /tmp/recipes-before/AssertJPrimitiveRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
72d69
<             //language=markdown
78d74
<             //language=markdown
150,151c146,147
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true)
---
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true)
174d169
<             //language=markdown
180d174
<             //language=markdown
252,253c246,247
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true)
---
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true)
276d269
<             //language=markdown
282d274
<             //language=markdown
332,333c324,325
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true)
---
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true)
356d347
<             //language=markdown
362d352
<             //language=markdown
412,413c402,403
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true)
---
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true)
436d425
<             //language=markdown
442d430
<             //language=markdown
492,493c480,481
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true)
---
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true)
516d503
<             //language=markdown
522d508
<             //language=markdown
572,573c558,559
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true),
<                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true)
---
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isTrue(..)", true),
>                             new UsesMethod<>("org.assertj.core.api.AbstractBooleanAssert isFalse(..)", true)
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJRulesRecipes.java /tmp/recipes-before/AssertJRulesRecipes.java
35,36c35
<         //language=markdown
<         return "`AssertJRules` Refaster recipes";
---
>         return "Refaster rules related to AssertJ expressions and statements";
41,42c40
<         //language=markdown
<         return "Refaster rules related to AssertJ expressions and statements [Source](https://error-prone.picnic.tech/refasterrules/AssertJRules).";
---
>         return "Refaster template recipes for `tech.picnic.errorprone.refasterrules.AssertJRules`. [Source](https://error-prone.picnic.tech/refasterrules/AssertJRules).";
69d66
<             //language=markdown
75d71
<             //language=markdown
109d104
<                         new UsesType<>("java.util.OptionalDouble", true),
111c106
<                         new UsesMethod<>("java.util.OptionalDouble getAsDouble(..)", true),
---
>                         new UsesType<>("java.util.OptionalDouble", true),
113c108,109
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.util.OptionalDouble getAsDouble(..)", true)
135d130
<             //language=markdown
141d135
<             //language=markdown
175d168
<                         new UsesType<>("java.util.OptionalInt", true),
177c170
<                         new UsesMethod<>("java.util.OptionalInt getAsInt(..)", true),
---
>                         new UsesType<>("java.util.OptionalInt", true),
179c172,173
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.util.OptionalInt getAsInt(..)", true)
201d194
<             //language=markdown
207d199
<             //language=markdown
241d232
<                         new UsesType<>("java.util.OptionalLong", true),
243c234
<                         new UsesMethod<>("java.util.OptionalLong getAsLong(..)", true),
---
>                         new UsesType<>("java.util.OptionalLong", true),
245c236,237
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.util.OptionalLong getAsLong(..)", true)
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJShortRulesRecipes.java /tmp/recipes-before/AssertJShortRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
71d68
<             //language=markdown
77d73
<             //language=markdown
151d146
<             //language=markdown
157d151
<             //language=markdown
231d224
<             //language=markdown
237d229
<             //language=markdown
293d284
<             //language=markdown
299d289
<             //language=markdown
355d344
<             //language=markdown
361d349
<             //language=markdown
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJStringRulesRecipes.java /tmp/recipes-before/AssertJStringRulesRecipes.java
35d34
<         //language=markdown
41d39
<         //language=markdown
74d71
<             //language=markdown
80d76
<             //language=markdown
136d131
<             //language=markdown
142d136
<             //language=markdown
175d168
<                         new UsesMethod<>("java.lang.String isEmpty(..)", true),
177c170,171
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.lang.String isEmpty(..)", true)
199d192
<             //language=markdown
205d197
<             //language=markdown
261d252
<             //language=markdown
267d257
<             //language=markdown
301d290
<                         new UsesMethod<>("java.lang.String isEmpty(..)", true),
303c292,293
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.lang.String isEmpty(..)", true)
325d314
<             //language=markdown
331d319
<             //language=markdown
365d352
<                         new UsesMethod<>("java.lang.String matches(..)", true),
367c354,355
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.lang.String matches(..)", true)
389d376
<             //language=markdown
395d381
<             //language=markdown
429d414
<                         new UsesMethod<>("java.lang.String matches(..)", true),
431c416,417
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.lang.String matches(..)", true)
453d438
<             //language=markdown
459d443
<             //language=markdown
493d476
<                         new UsesType<>("java.nio.charset.Charset", true),
495d477
<                         new UsesType<>("java.nio.file.Path", true),
497,498c479,482
<                         new UsesMethod<>("java.nio.file.Files readString(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesType<>("java.nio.file.Path", true),
>                         new UsesType<>("java.nio.charset.Charset", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.nio.file.Files readString(..)", true)
520d503
<             //language=markdown
526d508
<             //language=markdown
561d542
<                         new UsesType<>("java.nio.file.Path", true),
563,564c544,546
<                         new UsesMethod<>("java.nio.file.Files readString(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true)
---
>                         new UsesType<>("java.nio.file.Path", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThat(..)", true),
>                         new UsesMethod<>("java.nio.file.Files readString(..)", true)
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssertJThrowingCallableRulesRecipes.java /tmp/recipes-before/AssertJThrowingCallableRulesRecipes.java
35d34
<         //language=markdown
41,42c40
<         //language=markdown
<         return "For reasons of consistency we prefer `org.assertj.core.api.Assertions#assertThatThrownBy` over static methods for specific exception\n types. Note that only the most common assertion expressions are rewritten here; covering all\n cases would require the implementation of an Error Prone check instead. [Source](https://error-prone.picnic.tech/refasterrules/AssertJThrowingCallableRules).";
---
>         return "<p>For reasons of consistency we prefer `org.assertj.core.api.Assertions#assertThatThrownBy` over static methods for specific exception\n types. Note that only the most common assertion expressions are rewritten here; covering all\n cases would require the implementation of an Error Prone check instead. [Source](https://error-prone.picnic.tech/refasterrules/AssertJThrowingCallableRules).";
50d47
<                 new AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessageRecipe(),
55d51
<                 new AssertThatThrownByIllegalStateExceptionRootCauseHasMessageRecipe(),
61d56
<                 new AssertThatThrownByNullPointerExceptionRootCauseHasMessageRecipe(),
67d61
<                 new AssertThatThrownByIOExceptionRootCauseHasMessageRecipe(),
70a65
>                 new AssertThatThrownByRecipe(),
72d66
<                 new AssertThatThrownByRootCauseHasMessageRecipe(),
94d87
<             //language=markdown
100d92
<             //language=markdown
136,137c128,129
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalArgumentException(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalArgumentException(..)", true)
159d150
<             //language=markdown
165d155
<             //language=markdown
201d190
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalArgumentException(..)", true),
203,270c192,193
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
<                     ),
<                     javaVisitor
<             );
<         }
<     }
< 
<     /**
<      * OpenRewrite recipe created for Refaster template {@code AssertJThrowingCallableRules.AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessage}.
<      */
<     @SuppressWarnings("all")
<     @NullMarked
<     @Generated("org.openrewrite.java.template.processor.RefasterTemplateProcessor")
<     public static class AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessageRecipe extends Recipe {
< 
<         /**
<          * Instantiates a new instance.
<          */
<         public AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessageRecipe() {}
< 
<         @Override
<         public String getDisplayName() {
<             //language=markdown
<             return "Refaster template `AssertJThrowingCallableRules.AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessage`";
<         }
< 
<         @Override
<         public String getDescription() {
<             //language=markdown
<             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByIllegalArgumentExceptionRootCauseHasMessage {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownByIllegalArgumentException\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {\n        return assertThatIllegalArgumentException().isThrownBy(throwingCallable).havingRootCause().withMessage(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalArgumentException.class).rootCause().hasMessage(message);\n    }\n}\n```\n.";
<         }
< 
<         @Override
<         public TreeVisitor<?, ExecutionContext> getVisitor() {
<             JavaVisitor<ExecutionContext> javaVisitor = new AbstractRefasterJavaVisitor() {
<                 final JavaTemplate before = JavaTemplate
<                         .builder("org.assertj.core.api.Assertions.assertThatIllegalArgumentException().isThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).havingRootCause().withMessage(#{message:any(java.lang.String)})")
<                         .javaParser(JavaParser.fromJavaVersion().classpath(JavaParser.runtimeClasspath()))
<                         .build();
<                 final JavaTemplate after = JavaTemplate
<                         .builder("org.assertj.core.api.Assertions.assertThatThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).isInstanceOf(IllegalArgumentException.class).rootCause().hasMessage(#{message:any(java.lang.String)})")
<                         .javaParser(JavaParser.fromJavaVersion().classpath(JavaParser.runtimeClasspath()))
<                         .build();
< 
<                 @Override
<                 public J visitMethodInvocation(J.MethodInvocation elem, ExecutionContext ctx) {
<                     JavaTemplate.Matcher matcher;
<                     if ((matcher = before.matcher(getCursor())).find()) {
<                         maybeRemoveImport("org.assertj.core.api.Assertions.assertThatIllegalArgumentException");
<                         return embed(
<                                 after.apply(getCursor(), elem.getCoordinates().replace(), matcher.parameter(0), matcher.parameter(1)),
<                                 getCursor(),
<                                 ctx,
<                                 SHORTEN_NAMES
<                         );
<                     }
<                     return super.visitMethodInvocation(elem, ctx);
<                 }
< 
<             };
<             return Preconditions.check(
<                     Preconditions.and(
<                         new UsesType<>("org.assertj.core.api.AbstractObjectAssert", true),
<                         new UsesType<>("org.assertj.core.api.ThrowableAssert.ThrowingCallable", true),
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalArgumentException(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative havingRootCause(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative withMessage(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalArgumentException(..)", true)
292d214
<             //language=markdown
298d219
<             //language=markdown
334d254
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalArgumentException(..)", true),
336c256,257
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalArgumentException(..)", true)
358d278
<             //language=markdown
364d283
<             //language=markdown
400d318
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalArgumentException(..)", true),
402c320,321
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalArgumentException(..)", true)
424d342
<             //language=markdown
430d347
<             //language=markdown
466,467c383,384
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true)
489d405
<             //language=markdown
495d410
<             //language=markdown
531d445
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true),
533,600c447,448
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
<                     ),
<                     javaVisitor
<             );
<         }
<     }
< 
<     /**
<      * OpenRewrite recipe created for Refaster template {@code AssertJThrowingCallableRules.AssertThatThrownByIllegalStateExceptionRootCauseHasMessage}.
<      */
<     @SuppressWarnings("all")
<     @NullMarked
<     @Generated("org.openrewrite.java.template.processor.RefasterTemplateProcessor")
<     public static class AssertThatThrownByIllegalStateExceptionRootCauseHasMessageRecipe extends Recipe {
< 
<         /**
<          * Instantiates a new instance.
<          */
<         public AssertThatThrownByIllegalStateExceptionRootCauseHasMessageRecipe() {}
< 
<         @Override
<         public String getDisplayName() {
<             //language=markdown
<             return "Refaster template `AssertJThrowingCallableRules.AssertThatThrownByIllegalStateExceptionRootCauseHasMessage`";
<         }
< 
<         @Override
<         public String getDescription() {
<             //language=markdown
<             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByIllegalStateExceptionRootCauseHasMessage {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownByIllegalStateException\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {\n        return assertThatIllegalStateException().isThrownBy(throwingCallable).havingRootCause().withMessage(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(IllegalStateException.class).rootCause().hasMessage(message);\n    }\n}\n```\n.";
<         }
< 
<         @Override
<         public TreeVisitor<?, ExecutionContext> getVisitor() {
<             JavaVisitor<ExecutionContext> javaVisitor = new AbstractRefasterJavaVisitor() {
<                 final JavaTemplate before = JavaTemplate
<                         .builder("org.assertj.core.api.Assertions.assertThatIllegalStateException().isThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).havingRootCause().withMessage(#{message:any(java.lang.String)})")
<                         .javaParser(JavaParser.fromJavaVersion().classpath(JavaParser.runtimeClasspath()))
<                         .build();
<                 final JavaTemplate after = JavaTemplate
<                         .builder("org.assertj.core.api.Assertions.assertThatThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).isInstanceOf(IllegalStateException.class).rootCause().hasMessage(#{message:any(java.lang.String)})")
<                         .javaParser(JavaParser.fromJavaVersion().classpath(JavaParser.runtimeClasspath()))
<                         .build();
< 
<                 @Override
<                 public J visitMethodInvocation(J.MethodInvocation elem, ExecutionContext ctx) {
<                     JavaTemplate.Matcher matcher;
<                     if ((matcher = before.matcher(getCursor())).find()) {
<                         maybeRemoveImport("org.assertj.core.api.Assertions.assertThatIllegalStateException");
<                         return embed(
<                                 after.apply(getCursor(), elem.getCoordinates().replace(), matcher.parameter(0), matcher.parameter(1)),
<                                 getCursor(),
<                                 ctx,
<                                 SHORTEN_NAMES
<                         );
<                     }
<                     return super.visitMethodInvocation(elem, ctx);
<                 }
< 
<             };
<             return Preconditions.check(
<                     Preconditions.and(
<                         new UsesType<>("org.assertj.core.api.AbstractObjectAssert", true),
<                         new UsesType<>("org.assertj.core.api.ThrowableAssert.ThrowingCallable", true),
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative havingRootCause(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative withMessage(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true)
622d469
<             //language=markdown
628d474
<             //language=markdown
664d509
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true),
666c511,512
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true)
688d533
<             //language=markdown
694d538
<             //language=markdown
730d573
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true),
732c575,576
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true)
754d597
<             //language=markdown
760d602
<             //language=markdown
796d637
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true),
798c639,640
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIllegalStateException(..)", true)
820d661
<             //language=markdown
826d666
<             //language=markdown
862,863c702,703
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true)
885d724
<             //language=markdown
891d729
<             //language=markdown
927,994d764
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative withMessage(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
<                     ),
<                     javaVisitor
<             );
<         }
<     }
< 
<     /**
<      * OpenRewrite recipe created for Refaster template {@code AssertJThrowingCallableRules.AssertThatThrownByNullPointerExceptionRootCauseHasMessage}.
<      */
<     @SuppressWarnings("all")
<     @NullMarked
<     @Generated("org.openrewrite.java.template.processor.RefasterTemplateProcessor")
<     public static class AssertThatThrownByNullPointerExceptionRootCauseHasMessageRecipe extends Recipe {
< 
<         /**
<          * Instantiates a new instance.
<          */
<         public AssertThatThrownByNullPointerExceptionRootCauseHasMessageRecipe() {}
< 
<         @Override
<         public String getDisplayName() {
<             //language=markdown
<             return "Refaster template `AssertJThrowingCallableRules.AssertThatThrownByNullPointerExceptionRootCauseHasMessage`";
<         }
< 
<         @Override
<         public String getDescription() {
<             //language=markdown
<             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByNullPointerExceptionRootCauseHasMessage {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownByNullPointerException\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {\n        return assertThatNullPointerException().isThrownBy(throwingCallable).havingRootCause().withMessage(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(NullPointerException.class).rootCause().hasMessage(message);\n    }\n}\n```\n.";
<         }
< 
<         @Override
<         public TreeVisitor<?, ExecutionContext> getVisitor() {
<             JavaVisitor<ExecutionContext> javaVisitor = new AbstractRefasterJavaVisitor() {
<                 final JavaTemplate before = JavaTemplate
<                         .builder("org.assertj.core.api.Assertions.assertThatNullPointerException().isThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).havingRootCause().withMessage(#{message:any(java.lang.String)})")
<                         .javaParser(JavaParser.fromJavaVersion().classpath(JavaParser.runtimeClasspath()))
<                         .build();
<                 final JavaTemplate after = JavaTemplate
<                         .builder("org.assertj.core.api.Assertions.assertThatThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).isInstanceOf(NullPointerException.class).rootCause().hasMessage(#{message:any(java.lang.String)})")
<                         .javaParser(JavaParser.fromJavaVersion().classpath(JavaParser.runtimeClasspath()))
<                         .build();
< 
<                 @Override
<                 public J visitMethodInvocation(J.MethodInvocation elem, ExecutionContext ctx) {
<                     JavaTemplate.Matcher matcher;
<                     if ((matcher = before.matcher(getCursor())).find()) {
<                         maybeRemoveImport("org.assertj.core.api.Assertions.assertThatNullPointerException");
<                         return embed(
<                                 after.apply(getCursor(), elem.getCoordinates().replace(), matcher.parameter(0), matcher.parameter(1)),
<                                 getCursor(),
<                                 ctx,
<                                 SHORTEN_NAMES
<                         );
<                     }
<                     return super.visitMethodInvocation(elem, ctx);
<                 }
< 
<             };
<             return Preconditions.check(
<                     Preconditions.and(
<                         new UsesType<>("org.assertj.core.api.AbstractObjectAssert", true),
<                         new UsesType<>("org.assertj.core.api.ThrowableAssert.ThrowingCallable", true),
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative havingRootCause(..)", true),
996c766,767
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true)
1018d788
<             //language=markdown
1024d793
<             //language=markdown
1060d828
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true),
1062c830,831
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true)
1084d852
<             //language=markdown
1090d857
<             //language=markdown
1126d892
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true),
1128c894,895
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true)
1150d916
<             //language=markdown
1156d921
<             //language=markdown
1192d956
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true),
1194c958,959
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatNullPointerException(..)", true)
1216d980
<             //language=markdown
1222d985
<             //language=markdown
1258,1259c1021,1022
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true)
1281d1043
<             //language=markdown
1287d1048
<             //language=markdown
1323d1083
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true),
1325,1392c1085,1086
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
<                     ),
<                     javaVisitor
<             );
<         }
<     }
< 
<     /**
<      * OpenRewrite recipe created for Refaster template {@code AssertJThrowingCallableRules.AssertThatThrownByIOExceptionRootCauseHasMessage}.
<      */
<     @SuppressWarnings("all")
<     @NullMarked
<     @Generated("org.openrewrite.java.template.processor.RefasterTemplateProcessor")
<     public static class AssertThatThrownByIOExceptionRootCauseHasMessageRecipe extends Recipe {
< 
<         /**
<          * Instantiates a new instance.
<          */
<         public AssertThatThrownByIOExceptionRootCauseHasMessageRecipe() {}
< 
<         @Override
<         public String getDisplayName() {
<             //language=markdown
<             return "Refaster template `AssertJThrowingCallableRules.AssertThatThrownByIOExceptionRootCauseHasMessage`";
<         }
< 
<         @Override
<         public String getDescription() {
<             //language=markdown
<             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByIOExceptionRootCauseHasMessage {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownByIOException\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {\n        return assertThatIOException().isThrownBy(throwingCallable).havingRootCause().withMessage(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(IOException.class).rootCause().hasMessage(message);\n    }\n}\n```\n.";
<         }
< 
<         @Override
<         public TreeVisitor<?, ExecutionContext> getVisitor() {
<             JavaVisitor<ExecutionContext> javaVisitor = new AbstractRefasterJavaVisitor() {
<                 final JavaTemplate before = JavaTemplate
<                         .builder("org.assertj.core.api.Assertions.assertThatIOException().isThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).havingRootCause().withMessage(#{message:any(java.lang.String)})")
<                         .javaParser(JavaParser.fromJavaVersion().classpath(JavaParser.runtimeClasspath()))
<                         .build();
<                 final JavaTemplate after = JavaTemplate
<                         .builder("org.assertj.core.api.Assertions.assertThatThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).isInstanceOf(java.io.IOException.class).rootCause().hasMessage(#{message:any(java.lang.String)})")
<                         .javaParser(JavaParser.fromJavaVersion().classpath(JavaParser.runtimeClasspath()))
<                         .build();
< 
<                 @Override
<                 public J visitMethodInvocation(J.MethodInvocation elem, ExecutionContext ctx) {
<                     JavaTemplate.Matcher matcher;
<                     if ((matcher = before.matcher(getCursor())).find()) {
<                         maybeRemoveImport("org.assertj.core.api.Assertions.assertThatIOException");
<                         return embed(
<                                 after.apply(getCursor(), elem.getCoordinates().replace(), matcher.parameter(0), matcher.parameter(1)),
<                                 getCursor(),
<                                 ctx,
<                                 SHORTEN_NAMES
<                         );
<                     }
<                     return super.visitMethodInvocation(elem, ctx);
<                 }
< 
<             };
<             return Preconditions.check(
<                     Preconditions.and(
<                         new UsesType<>("org.assertj.core.api.AbstractObjectAssert", true),
<                         new UsesType<>("org.assertj.core.api.ThrowableAssert.ThrowingCallable", true),
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative havingRootCause(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative withMessage(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true)
1414d1107
<             //language=markdown
1420d1112
<             //language=markdown
1456d1147
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true),
1458c1149,1150
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true)
1480d1171
<             //language=markdown
1486d1176
<             //language=markdown
1522d1211
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true),
1524c1213,1214
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true)
1546d1235
<             //language=markdown
1552d1240
<             //language=markdown
1588d1275
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true),
1590c1277,1278
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatIOException(..)", true)
1598c1286
<      * OpenRewrite recipe created for Refaster template {@code AssertJThrowingCallableRules.AssertThatThrownByHasMessage}.
---
>      * OpenRewrite recipe created for Refaster template {@code AssertJThrowingCallableRules.AssertThatThrownBy}.
1603c1291
<     public static class AssertThatThrownByHasMessageRecipe extends Recipe {
---
>     public static class AssertThatThrownByRecipe extends Recipe {
1608c1296
<         public AssertThatThrownByHasMessageRecipe() {}
---
>         public AssertThatThrownByRecipe() {}
1612,1613c1300
<             //language=markdown
<             return "Refaster template `AssertJThrowingCallableRules.AssertThatThrownByHasMessage`";
---
>             return "Refaster template `AssertJThrowingCallableRules.AssertThatThrownBy`";
1618,1619c1305
<             //language=markdown
<             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByHasMessage {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownByAsInstanceOfThrowable\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessage(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessage(message);\n    }\n}\n```\n.";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownBy {\n    \n    @BeforeTemplate\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType);\n    }\n}\n```\n.";
1626c1312
<                         .builder("org.assertj.core.api.Assertions.assertThatExceptionOfType(#{exceptionType:any(java.lang.Class<? extends java.lang.Throwable>)}).isThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).withMessage(#{message:any(java.lang.String)})")
---
>                         .builder("org.assertj.core.api.Assertions.assertThatExceptionOfType(#{exceptionType:any(java.lang.Class<? extends java.lang.Throwable>)}).isThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)})")
1630c1316
<                         .builder("org.assertj.core.api.Assertions.assertThatThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).isInstanceOf(#{exceptionType:any(java.lang.Class<? extends java.lang.Throwable>)}).hasMessage(#{message:any(java.lang.String)})")
---
>                         .builder("org.assertj.core.api.Assertions.assertThatThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).isInstanceOf(#{exceptionType:any(java.lang.Class<? extends java.lang.Throwable>)})")
1640c1326
<                                 after.apply(getCursor(), elem.getCoordinates().replace(), matcher.parameter(1), matcher.parameter(0), matcher.parameter(2)),
---
>                                 after.apply(getCursor(), elem.getCoordinates().replace(), matcher.parameter(1), matcher.parameter(0)),
1654,1656c1340,1341
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative withMessage(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true)
1664c1349
<      * OpenRewrite recipe created for Refaster template {@code AssertJThrowingCallableRules.AssertThatThrownByRootCauseHasMessage}.
---
>      * OpenRewrite recipe created for Refaster template {@code AssertJThrowingCallableRules.AssertThatThrownByHasMessage}.
1669c1354
<     public static class AssertThatThrownByRootCauseHasMessageRecipe extends Recipe {
---
>     public static class AssertThatThrownByHasMessageRecipe extends Recipe {
1674c1359
<         public AssertThatThrownByRootCauseHasMessageRecipe() {}
---
>         public AssertThatThrownByHasMessageRecipe() {}
1678,1679c1363
<             //language=markdown
<             return "Refaster template `AssertJThrowingCallableRules.AssertThatThrownByRootCauseHasMessage`";
---
>             return "Refaster template `AssertJThrowingCallableRules.AssertThatThrownByHasMessage`";
1684,1685c1368
<             //language=markdown
<             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByRootCauseHasMessage {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownByAsInstanceOfThrowable\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).havingRootCause().withMessage(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).rootCause().hasMessage(message);\n    }\n}\n```\n.";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByHasMessage {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownBy\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessage(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessage(message);\n    }\n}\n```\n.";
1692c1375
<                         .builder("org.assertj.core.api.Assertions.assertThatExceptionOfType(#{exceptionType:any(java.lang.Class<? extends java.lang.Throwable>)}).isThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).havingRootCause().withMessage(#{message:any(java.lang.String)})")
---
>                         .builder("org.assertj.core.api.Assertions.assertThatExceptionOfType(#{exceptionType:any(java.lang.Class<? extends java.lang.Throwable>)}).isThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).withMessage(#{message:any(java.lang.String)})")
1696c1379
<                         .builder("org.assertj.core.api.Assertions.assertThatThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).isInstanceOf(#{exceptionType:any(java.lang.Class<? extends java.lang.Throwable>)}).rootCause().hasMessage(#{message:any(java.lang.String)})")
---
>                         .builder("org.assertj.core.api.Assertions.assertThatThrownBy(#{throwingCallable:any(org.assertj.core.api.ThrowableAssert.ThrowingCallable)}).isInstanceOf(#{exceptionType:any(java.lang.Class<? extends java.lang.Throwable>)}).hasMessage(#{message:any(java.lang.String)})")
1720,1721d1402
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true),
<                         new UsesMethod<>("org.assertj.core.api.ThrowableAssertAlternative havingRootCause(..)", true),
1723c1404,1405
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true)
1745d1426
<             //language=markdown
1751,1752c1432
<             //language=markdown
<             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByHasMessageStartingWith {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownByAsInstanceOfThrowable\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageStartingWith(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageStartingWith(message);\n    }\n}\n```\n.";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByHasMessageStartingWith {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownBy\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageStartingWith(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageStartingWith(message);\n    }\n}\n```\n.";
1787d1466
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true),
1789c1468,1469
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true)
1811d1490
<             //language=markdown
1817,1818c1496
<             //language=markdown
<             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByHasMessageContaining {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownByAsInstanceOfThrowable\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageContaining(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageContaining(message);\n    }\n}\n```\n.";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByHasMessageContaining {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownBy\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageContaining(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageContaining(message);\n    }\n}\n```\n.";
1853d1530
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true),
1855c1532,1533
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true)
1877d1554
<             //language=markdown
1883,1884c1560
<             //language=markdown
<             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByHasMessageNotContaining {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownByAsInstanceOfThrowable\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageNotContaining(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageNotContaining(message);\n    }\n}\n```\n.";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class AssertThatThrownByHasMessageNotContaining {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"AssertThatThrownBy\")\n    AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatExceptionOfType(exceptionType).isThrownBy(throwingCallable).withMessageNotContaining(message);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    AbstractObjectAssert<?, ?> after(ThrowingCallable throwingCallable, Class<? extends Throwable> exceptionType, String message) {\n        return assertThatThrownBy(throwingCallable).isInstanceOf(exceptionType).hasMessageNotContaining(message);\n    }\n}\n```\n.";
1919d1594
<                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true),
1921c1596,1597
<                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true)
---
>                         new UsesMethod<>("org.assertj.core.api.ThrowableTypeAssert isThrownBy(..)", true),
>                         new UsesMethod<>("org.assertj.core.api.Assertions assertThatExceptionOfType(..)", true)
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/AssortedRulesRecipes.java /tmp/recipes-before/AssortedRulesRecipes.java
35,36c35
<         //language=markdown
<         return "`AssortedRules` Refaster recipes";
---
>         return "Assorted Refaster rules that do not (yet) belong in one of the other classes with more topical Refaster rules";
41,42c40
<         //language=markdown
<         return "Assorted Refaster rules that do not (yet) belong in one of the other classes with more topical Refaster rules [Source](https://error-prone.picnic.tech/refasterrules/AssortedRules).";
---
>         return "Refaster template recipes for `tech.picnic.errorprone.refasterrules.AssortedRules`. [Source](https://error-prone.picnic.tech/refasterrules/AssortedRules).";
69,70c67
<             //language=markdown
<             return "Refaster template `AssortedRules.CheckIndex`";
---
>             return "Prefer `Objects#checkIndex(int, int)` over the Guava alternative";
75,76c72
<             //language=markdown
<             return "Prefer `Objects#checkIndex(int, int)` over the Guava alternative";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class CheckIndex {\n    \n    @BeforeTemplate\n    int before(int index, int size) {\n        return checkElementIndex(index, size);\n    }\n    \n    @AfterTemplate\n    @UseImportPolicy(value = STATIC_IMPORT_ALWAYS)\n    int after(int index, int size) {\n        return checkIndex(index, size);\n    }\n}\n```\n.";
128,129c124
<             //language=markdown
<             return "Refaster template `AssortedRules.LogicalImplication`";
---
>             return "Don't unnecessarily repeat boolean expressions";
134,135c129
<             //language=markdown
<             return "Don't unnecessarily repeat boolean expressions";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class LogicalImplication {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"java:S2589\")\n    boolean before(boolean firstTest, boolean secondTest) {\n        return firstTest || (!firstTest && secondTest);\n    }\n    \n    @AfterTemplate\n    boolean after(boolean firstTest, boolean secondTest) {\n        return firstTest || secondTest;\n    }\n}\n```\n.";
181,182c175
<             //language=markdown
<             return "Refaster template `AssortedRules.SplitToStream`";
---
>             return "Prefer `Splitter#splitToStream(CharSequence)` over less efficient alternatives";
187,188c180
<             //language=markdown
<             return "Prefer `Splitter#splitToStream(CharSequence)` over less efficient alternatives";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class SplitToStream {\n    \n    @BeforeTemplate\n    Stream<String> before(Splitter splitter, CharSequence charSequence) {\n        return Refaster.anyOf(Streams.stream(splitter.split(charSequence)), splitter.splitToList(charSequence).stream());\n    }\n    \n    @AfterTemplate\n    Stream<String> after(Splitter splitter, CharSequence charSequence) {\n        return splitter.splitToStream(charSequence);\n    }\n}\n```\n.";
233d224
<                         new UsesType<>("com.google.common.base.Splitter", true),
234a226
>                         new UsesType<>("com.google.common.base.Splitter", true),
237,238c229,231
<                                 new UsesMethod<>("com.google.common.base.Splitter splitToList(..)", true),
<                                 new UsesMethod<>("java.util.Collection stream(..)", true)
---
>                                 new UsesType<>("com.google.common.collect.Streams", true),
>                                 new UsesMethod<>("com.google.common.collect.Streams stream(..)", true),
>                                 new UsesMethod<>("com.google.common.base.Splitter split(..)", true)
241,243c234,235
<                                 new UsesType<>("com.google.common.collect.Streams", true),
<                                 new UsesMethod<>("com.google.common.base.Splitter split(..)", true),
<                                 new UsesMethod<>("com.google.common.collect.Streams stream(..)", true)
---
>                                 new UsesMethod<>("java.util.Collection stream(..)", true),
>                                 new UsesMethod<>("com.google.common.base.Splitter splitToList(..)", true)
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/BigDecimalRulesRecipes.java /tmp/recipes-before/BigDecimalRulesRecipes.java
35,36c35
<         //language=markdown
<         return "`BigDecimalRules` Refaster recipes";
---
>         return "Refaster rules related to expressions dealing with `BigDecimal`s";
41,42c40
<         //language=markdown
<         return "Refaster rules related to expressions dealing with `BigDecimal`s [Source](https://error-prone.picnic.tech/refasterrules/BigDecimalRules).";
---
>         return "Refaster template recipes for `tech.picnic.errorprone.refasterrules.BigDecimalRules`. [Source](https://error-prone.picnic.tech/refasterrules/BigDecimalRules).";
73,74c71
<             //language=markdown
<             return "Refaster template `BigDecimalRules.BigDecimalZero`";
---
>             return "Prefer using the constant `BigDecimal#ZERO` when possible";
79,80c76
<             //language=markdown
<             return "Prefer using the constant `BigDecimal#ZERO` when possible";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class BigDecimalZero {\n    \n    @BeforeTemplate\n    BigDecimal before() {\n        return Refaster.anyOf(BigDecimal.valueOf(0), new BigDecimal(\"0\"));\n    }\n    \n    @AfterTemplate\n    BigDecimal after() {\n        return BigDecimal.ZERO;\n    }\n}\n```\n.";
123,124c119,120
<                             new UsesMethod<>("java.math.BigDecimal <constructor>(..)", true),
<                             new UsesMethod<>("java.math.BigDecimal valueOf(..)", true)
---
>                             new UsesMethod<>("java.math.BigDecimal valueOf(..)", true),
>                             new UsesMethod<>("java.math.BigDecimal <constructor>(..)", true)
147,148c143
<             //language=markdown
<             return "Refaster template `BigDecimalRules.BigDecimalOne`";
---
>             return "Prefer using the constant `BigDecimal#ONE` when possible";
153,154c148
<             //language=markdown
<             return "Prefer using the constant `BigDecimal#ONE` when possible";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class BigDecimalOne {\n    \n    @BeforeTemplate\n    BigDecimal before() {\n        return Refaster.anyOf(BigDecimal.valueOf(1), new BigDecimal(\"1\"));\n    }\n    \n    @AfterTemplate\n    BigDecimal after() {\n        return BigDecimal.ONE;\n    }\n}\n```\n.";
197,198c191,192
<                             new UsesMethod<>("java.math.BigDecimal <constructor>(..)", true),
<                             new UsesMethod<>("java.math.BigDecimal valueOf(..)", true)
---
>                             new UsesMethod<>("java.math.BigDecimal valueOf(..)", true),
>                             new UsesMethod<>("java.math.BigDecimal <constructor>(..)", true)
221,222c215
<             //language=markdown
<             return "Refaster template `BigDecimalRules.BigDecimalTen`";
---
>             return "Prefer using the constant `BigDecimal#TEN` when possible";
227,228c220
<             //language=markdown
<             return "Prefer using the constant `BigDecimal#TEN` when possible";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class BigDecimalTen {\n    \n    @BeforeTemplate\n    BigDecimal before() {\n        return Refaster.anyOf(BigDecimal.valueOf(10), new BigDecimal(\"10\"));\n    }\n    \n    @AfterTemplate\n    BigDecimal after() {\n        return BigDecimal.TEN;\n    }\n}\n```\n.";
271,272c263,264
<                             new UsesMethod<>("java.math.BigDecimal <constructor>(..)", true),
<                             new UsesMethod<>("java.math.BigDecimal valueOf(..)", true)
---
>                             new UsesMethod<>("java.math.BigDecimal valueOf(..)", true),
>                             new UsesMethod<>("java.math.BigDecimal <constructor>(..)", true)
295,296c287
<             //language=markdown
<             return "Refaster template `BigDecimalRules.BigDecimalValueOf`";
---
>             return "Prefer `BigDecimal#valueOf(double)` over the associated constructor";
301,302c292
<             //language=markdown
<             return "Prefer `BigDecimal#valueOf(double)` over the associated constructor";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class BigDecimalValueOf {\n    \n    @BeforeTemplate\n    @SuppressWarnings(value = \"java:S2111\")\n    BigDecimal before(double value) {\n        return new BigDecimal(value);\n    }\n    \n    @AfterTemplate\n    BigDecimal after(double value) {\n        return BigDecimal.valueOf(value);\n    }\n}\n```\n.";
355,356c345
<             //language=markdown
<             return "Refaster template `BigDecimalRules.BigDecimalSignumIsZero`";
---
>             return "Prefer using `BigDecimal#signum()` over more contrived alternatives";
361,362c350
<             //language=markdown
<             return "Prefer using `BigDecimal#signum()` over more contrived alternatives";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class BigDecimalSignumIsZero {\n    \n    @BeforeTemplate\n    boolean before(BigDecimal value) {\n        return Refaster.anyOf(value.compareTo(BigDecimal.ZERO) == 0, BigDecimal.ZERO.compareTo(value) == 0);\n    }\n    \n    @AfterTemplate\n    @AlsoNegation\n    boolean after(BigDecimal value) {\n        return value.signum() == 0;\n    }\n}\n```\n.";
426,427c414
<             //language=markdown
<             return "Refaster template `BigDecimalRules.BigDecimalSignumIsPositive`";
---
>             return "Prefer a `BigDecimal#signum()` comparison to 1 over more contrived or less clear alternatives";
432,433c419
<             //language=markdown
<             return "Prefer a `BigDecimal#signum()` comparison to 1 over more contrived or less clear alternatives";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class BigDecimalSignumIsPositive {\n    \n    @BeforeTemplate\n    boolean before(BigDecimal value) {\n        return Refaster.anyOf(value.compareTo(BigDecimal.ZERO) > 0, BigDecimal.ZERO.compareTo(value) < 0, value.signum() > 0, value.signum() >= 1);\n    }\n    \n    @AfterTemplate\n    @AlsoNegation\n    boolean after(BigDecimal value) {\n        return value.signum() == 1;\n    }\n}\n```\n.";
498a485,486
>                             new UsesMethod<>("java.math.BigDecimal compareTo(..)", true),
>                             new UsesMethod<>("java.math.BigDecimal signum(..)", true),
522,523c510
<             //language=markdown
<             return "Refaster template `BigDecimalRules.BigDecimalSignumIsNegative`";
---
>             return "Prefer a `BigDecimal#signum()` comparison to -1 over more contrived or less clear alternatives";
528,529c515
<             //language=markdown
<             return "Prefer a `BigDecimal#signum()` comparison to -1 over more contrived or less clear alternatives";
---
>             return "Recipe created for the following Refaster template:\n```java\nstatic final class BigDecimalSignumIsNegative {\n    \n    @BeforeTemplate\n    boolean before(BigDecimal value) {\n        return Refaster.anyOf(value.compareTo(BigDecimal.ZERO) < 0, BigDecimal.ZERO.compareTo(value) > 0, value.signum() < 0, value.signum() <= -1);\n    }\n    \n    @AfterTemplate\n    @AlsoNegation\n    boolean after(BigDecimal value) {\n        return value.signum() == -1;\n    }\n}\n```\n.";
594a581,582
>                             new UsesMethod<>("java.math.BigDecimal compareTo(..)", true),
>                             new UsesMethod<>("java.math.BigDecimal signum(..)", true),
diff --color -r error-prone-contrib/target/generated-sources/annotations/tech/picnic/errorprone/refasterrules/BugCheckerRulesRecipes.java /tmp/recipes-before/BugCheckerRulesRecipes.java
35,36c35
<         //language=markdown
<         return "`BugCheckerRules` Refaster recipes";
---
>         return "Refaster rules related to `com.google.errorprone.bugpatterns.BugChecker` classes";
41,42c40
<         //language=markdown
<         return "Refaster rules related to `com.google.errorprone.bugpatterns.BugChecker` classes [Source](https://error-prone.picnic.tech/refasterrules/BugCheckerRules).";
---
>         return "Refaster template recipes for `tech.picnic.errorprone.refasterrules.BugCheckerRules`. [Source](https://error-prone.picnic.tech/refasterrules/BugCheckerRules).";
69,70c67

@Stephan202 Stephan202 added this to the 0.20.0 milestone Dec 24, 2024
Copy link
Member

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generate a unified diff, using diff -u. There are only changes to the descriptions and display names. So LGTM!

@Stephan202 Stephan202 force-pushed the renovate/version.rewrite-templating branch from dd28676 to 6d130d8 Compare December 24, 2024 10:36
Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie rickie merged commit 72b701c into master Dec 24, 2024
16 checks passed
@rickie rickie deleted the renovate/version.rewrite-templating branch December 24, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants