From 0fdc027e5e594bf6fe11723a9f673f9641d4ff0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Rosen=C3=B6gger?= <123haynes@gmail.com> Date: Thu, 5 Dec 2024 22:06:30 +0100 Subject: [PATCH 1/3] Add ReplaceMockBeanAndSpyBean Recipe --- .../boot3/ReplaceMockBeanAndSpyBean.java | 63 +++++ .../boot3/ReplaceMockBeanAndSpyBeanTest.java | 215 ++++++++++++++++++ 2 files changed, 278 insertions(+) create mode 100644 src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java create mode 100644 src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java diff --git a/src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java b/src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java new file mode 100644 index 000000000..3ce4291ba --- /dev/null +++ b/src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java @@ -0,0 +1,63 @@ +package org.openrewrite.java.spring.boot3; + +import org.openrewrite.ExecutionContext; +import org.openrewrite.Recipe; +import org.openrewrite.java.AnnotationMatcher; +import org.openrewrite.java.ChangeType; +import org.openrewrite.java.JavaIsoVisitor; +import org.openrewrite.java.tree.J; + +public class ReplaceMockBeanAndSpyBean extends Recipe { + private static final AnnotationMatcher MOCKBEAN_ANNOTATION_MATCHER = + new AnnotationMatcher("@org.springframework.boot.test.mock.mockito.MockBean"); + private static final AnnotationMatcher SPYBEAN_ANNOTATION_MATCHER = + new AnnotationMatcher("@org.springframework.boot.test.mock.mockito.SpyBean"); + + + @Override + public String getDisplayName() { + return "Replace @MockBean and @SpyBean"; + } + + @Override + public String getDescription() { + return "Replaces `@MockBean` and `@SpyBean` annotations with `@MockitoBean` and `@MockitoSpyBean`. " + + "Also Update the relevant import statements."; + } + + @Override + public JavaIsoVisitor getVisitor() { + return new JavaIsoVisitor() { + @Override + public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ctx) { + + J.Annotation a = super.visitAnnotation(annotation, ctx); + + // Check if the annotation is @MockBean + if (MOCKBEAN_ANNOTATION_MATCHER.matches(a)) { + //remove the old import and add the new one + maybeRemoveImport("org.springframework.boot.test.mock.mockito.MockBean"); + maybeAddImport("org.springframework.test.context.bean.override.mockito.MockitoBean"); + + //Change the annotation + a = (J.Annotation) new ChangeType("org.springframework.boot.test.mock.mockito.MockBean", + "org.springframework.test.context.bean.override.mockito.MockitoBean", false) + .getVisitor().visit(a, ctx, getCursor().getParentOrThrow()); + } + + // Check if the annotation is @SpyBean + if (SPYBEAN_ANNOTATION_MATCHER.matches(a)) { + //remove the old import and add the new one + maybeRemoveImport("org.springframework.boot.test.mock.mockito.SpyBean"); + maybeAddImport("org.springframework.test.context.bean.override.mockito.MockitoSpyBean"); + + //Change the annotation + a = (J.Annotation) new ChangeType("org.springframework.boot.test.mock.mockito.SpyBean", + "org.springframework.test.context.bean.override.mockito.MockitoSpyBean", false) + .getVisitor().visit(a, ctx, getCursor().getParentOrThrow()); + } + return a != null ? a : annotation; + } + }; + } +} diff --git a/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java b/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java new file mode 100644 index 000000000..1fb37f7d1 --- /dev/null +++ b/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java @@ -0,0 +1,215 @@ +package org.openrewrite.java.spring.boot3; + +import org.junit.jupiter.api.Test; +import org.openrewrite.InMemoryExecutionContext; +import org.openrewrite.java.JavaParser; +import org.openrewrite.test.RecipeSpec; +import org.openrewrite.test.RewriteTest; + +import static org.openrewrite.java.Assertions.java; + +class ReplaceMockBeanAndSpyBeanTest implements RewriteTest { + + @Override + public void defaults(RecipeSpec spec) { + spec.recipe(new ReplaceMockBeanAndSpyBean()) + .parser(JavaParser.fromJavaVersion() + .classpathFromResources(new InMemoryExecutionContext(), + "spring-boot-test")); + } + + @Test + void replacesMockBeanWithMockitoBean() { + rewriteRun( + // Input source file before applying the recipe + java( + """ + import org.springframework.boot.test.mock.mockito.MockBean; + + public class SomeTest { + @MockBean + private String someService; + } + """, + // Expected output after applying the recipe + """ + import org.springframework.test.context.bean.override.mockito.MockitoBean; + + public class SomeTest { + @MockitoBean + private String someService; + } + """ + ) + ); + } + + @Test + void doesNotChangeOtherAnnotations() { + rewriteRun( + java( + """ + import org.springframework.boot.test.mock.mockito.MockBean; + + public class SomeTest { + + @MockBean + @Deprecated + private String someService; + } + """, + """ + import org.springframework.test.context.bean.override.mockito.MockitoBean; + + public class SomeTest { + + @MockitoBean + @Deprecated + private String someService; + } + """ + ) + ); + } + + @Test + void handlesNoMockBeanImport() { + rewriteRun( + java( + """ + public class SomeTest { + @org.springframework.boot.test.mock.mockito.MockBean + private String someService; + } + """, + """ + public class SomeTest { + @org.springframework.test.context.bean.override.mockito.MockitoBean + private String someService; + } + """ + ) + ); + } + + @Test + void replacesMockBeanWithMockitoBeanAndSpyBeanWithMockitoSpyBean() { + rewriteRun( + // Input source file before applying the recipe + java( + """ + import org.springframework.boot.test.mock.mockito.MockBean; + import org.springframework.boot.test.mock.mockito.SpyBean; + + public class SomeTest { + @SpyBean + private String someService; + + @MockBean + private String someMockService; + } + """, + // Expected output after applying the recipe + """ + import org.springframework.test.context.bean.override.mockito.MockitoBean; + import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; + + public class SomeTest { + @MockitoSpyBean + private String someService; + + @MockitoBean + private String someMockService; + } + """ + ) + ); + } + + @Test + void replacesSpyBeanWithMockitoSpyBean() { + rewriteRun( + // Input source file before applying the recipe + java( + """ + import org.springframework.boot.test.mock.mockito.SpyBean; + + public class SomeTest { + @SpyBean + private String someService; + } + """, + // Expected output after applying the recipe + """ + import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; + + public class SomeTest { + @MockitoSpyBean + private String someService; + } + """ + ) + ); + } + + @Test + void doesNotChangeOtherAnnotationsSpyBean() { + rewriteRun( + java( + """ + import org.springframework.boot.test.mock.mockito.SpyBean; + + public class SomeTest { + + @SpyBean + @Deprecated + private String someService; + } + """, + """ + import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; + + public class SomeTest { + + @MockitoSpyBean + @Deprecated + private String someService; + } + """ + ) + ); + } + + @Test + void handlesNoSpyBeanImport() { + rewriteRun( + java( + """ + public class SomeTest { + @org.springframework.boot.test.mock.mockito.SpyBean + private String someService; + } + """, + """ + public class SomeTest { + @org.springframework.test.context.bean.override.mockito.MockitoSpyBean + private String someService; + } + """ + ) + ); + } + + @Test + void doesNothingWhenNoAnnotationPresent() { + rewriteRun( + java( + """ + public class SomeTest { + private String someService; + } + """ + ) + ); + } +} From 408f88d1c1219de4e209f9351c285e6c690db31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Rosen=C3=B6gger?= <123haynes@gmail.com> Date: Thu, 5 Dec 2024 22:06:30 +0100 Subject: [PATCH 2/3] Add ReplaceMockBeanAndSpyBean Recipe --- .../boot3/ReplaceMockBeanAndSpyBean.java | 63 ---- .../rewrite/replace-mock-and-spybean.yml | 48 ++++ .../boot3/ReplaceMockBeanAndSpyBeanTest.java | 270 ++++++++++++------ 3 files changed, 224 insertions(+), 157 deletions(-) delete mode 100644 src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java create mode 100644 src/main/resources/META-INF/rewrite/replace-mock-and-spybean.yml diff --git a/src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java b/src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java deleted file mode 100644 index 3ce4291ba..000000000 --- a/src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openrewrite.java.spring.boot3; - -import org.openrewrite.ExecutionContext; -import org.openrewrite.Recipe; -import org.openrewrite.java.AnnotationMatcher; -import org.openrewrite.java.ChangeType; -import org.openrewrite.java.JavaIsoVisitor; -import org.openrewrite.java.tree.J; - -public class ReplaceMockBeanAndSpyBean extends Recipe { - private static final AnnotationMatcher MOCKBEAN_ANNOTATION_MATCHER = - new AnnotationMatcher("@org.springframework.boot.test.mock.mockito.MockBean"); - private static final AnnotationMatcher SPYBEAN_ANNOTATION_MATCHER = - new AnnotationMatcher("@org.springframework.boot.test.mock.mockito.SpyBean"); - - - @Override - public String getDisplayName() { - return "Replace @MockBean and @SpyBean"; - } - - @Override - public String getDescription() { - return "Replaces `@MockBean` and `@SpyBean` annotations with `@MockitoBean` and `@MockitoSpyBean`. " + - "Also Update the relevant import statements."; - } - - @Override - public JavaIsoVisitor getVisitor() { - return new JavaIsoVisitor() { - @Override - public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ctx) { - - J.Annotation a = super.visitAnnotation(annotation, ctx); - - // Check if the annotation is @MockBean - if (MOCKBEAN_ANNOTATION_MATCHER.matches(a)) { - //remove the old import and add the new one - maybeRemoveImport("org.springframework.boot.test.mock.mockito.MockBean"); - maybeAddImport("org.springframework.test.context.bean.override.mockito.MockitoBean"); - - //Change the annotation - a = (J.Annotation) new ChangeType("org.springframework.boot.test.mock.mockito.MockBean", - "org.springframework.test.context.bean.override.mockito.MockitoBean", false) - .getVisitor().visit(a, ctx, getCursor().getParentOrThrow()); - } - - // Check if the annotation is @SpyBean - if (SPYBEAN_ANNOTATION_MATCHER.matches(a)) { - //remove the old import and add the new one - maybeRemoveImport("org.springframework.boot.test.mock.mockito.SpyBean"); - maybeAddImport("org.springframework.test.context.bean.override.mockito.MockitoSpyBean"); - - //Change the annotation - a = (J.Annotation) new ChangeType("org.springframework.boot.test.mock.mockito.SpyBean", - "org.springframework.test.context.bean.override.mockito.MockitoSpyBean", false) - .getVisitor().visit(a, ctx, getCursor().getParentOrThrow()); - } - return a != null ? a : annotation; - } - }; - } -} diff --git a/src/main/resources/META-INF/rewrite/replace-mock-and-spybean.yml b/src/main/resources/META-INF/rewrite/replace-mock-and-spybean.yml new file mode 100644 index 000000000..026c8df32 --- /dev/null +++ b/src/main/resources/META-INF/rewrite/replace-mock-and-spybean.yml @@ -0,0 +1,48 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://www.apache.org/licenses/LICENSE-2.0 +#

+# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.java.boot3.ReplaceMockBeanAndSpyBean +displayName: Replace `@MockBean` and `@SpyBean` +description: Replaces `@MockBean` and `@SpyBean` annotations with `@MockitoBean` and `@MockitoSpyBean`. +recipeList: + - org.openrewrite.java.ChangeAnnotationAttributeName: + annotationType: org.springframework.boot.test.mock.mockito.MockBean + oldAttributeName: answer + newAttributeName: answers + - org.openrewrite.java.RemoveAnnotationAttribute: + annotationType: org.springframework.boot.test.mock.mockito.MockBean + attributeName: classes + - org.openrewrite.java.RemoveAnnotationAttribute: + annotationType: org.springframework.boot.test.mock.mockito.MockBean + attributeName: value + - org.openrewrite.java.ChangeType: + oldFullyQualifiedTypeName: org.springframework.boot.test.mock.mockito.MockBean + newFullyQualifiedTypeName: org.springframework.test.context.bean.override.mockito.MockitoBean + + - org.openrewrite.java.RemoveAnnotationAttribute: + annotationType: org.springframework.boot.test.mock.mockito.SpyBean + attributeName: classes + - org.openrewrite.java.RemoveAnnotationAttribute: + annotationType: org.springframework.boot.test.mock.mockito.SpyBean + attributeName: value + - org.openrewrite.java.RemoveAnnotationAttribute: + annotationType: org.springframework.boot.test.mock.mockito.SpyBean + attributeName: proxyTargetAware + - org.openrewrite.java.ChangeType: + oldFullyQualifiedTypeName: org.springframework.boot.test.mock.mockito.SpyBean + newFullyQualifiedTypeName: org.springframework.test.context.bean.override.mockito.MockitoSpyBean diff --git a/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java b/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java index 1fb37f7d1..e9d79a566 100644 --- a/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java +++ b/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java @@ -1,6 +1,7 @@ package org.openrewrite.java.spring.boot3; import org.junit.jupiter.api.Test; +import org.openrewrite.DocumentExample; import org.openrewrite.InMemoryExecutionContext; import org.openrewrite.java.JavaParser; import org.openrewrite.test.RecipeSpec; @@ -12,62 +13,117 @@ class ReplaceMockBeanAndSpyBeanTest implements RewriteTest { @Override public void defaults(RecipeSpec spec) { - spec.recipe(new ReplaceMockBeanAndSpyBean()) + spec.recipeFromResources("org.openrewrite.java.boot3.ReplaceMockBeanAndSpyBean") .parser(JavaParser.fromJavaVersion() .classpathFromResources(new InMemoryExecutionContext(), - "spring-boot-test")); + "spring-boot-test", "mockito-core")); } + @DocumentExample @Test void replacesMockBeanWithMockitoBean() { rewriteRun( // Input source file before applying the recipe java( """ - import org.springframework.boot.test.mock.mockito.MockBean; + import org.springframework.boot.test.mock.mockito.MockBean; - public class SomeTest { - @MockBean - private String someService; - } - """, + public class SomeTest { + @MockBean + private String someService; + } + """, // Expected output after applying the recipe """ - import org.springframework.test.context.bean.override.mockito.MockitoBean; + import org.springframework.test.context.bean.override.mockito.MockitoBean; - public class SomeTest { - @MockitoBean - private String someService; - } + public class SomeTest { + @MockitoBean + private String someService; + } + """ + ) + ); + } + + @Test + void replacesMockBeanWithMockitoBeanWithAttributes() { + rewriteRun( + // Input source file before applying the recipe + java( + """ + import org.mockito.Answers; + import org.springframework.boot.test.mock.mockito.MockBean; + + public class SomeTest { + @MockBean(name="someName", answer="Answers.RETURNS_DEFAULTS", classes=String.class, value=String.class) + private String someService; + } + """, + // Expected output after applying the recipe """ + import org.mockito.Answers; + import org.springframework.test.context.bean.override.mockito.MockitoBean; + + public class SomeTest { + @MockitoBean(name="someName", answers="Answers.RETURNS_DEFAULTS") + private String someService; + } + """ ) ); } @Test - void doesNotChangeOtherAnnotations() { + void replacesMockBeanWithParamsWithMockitoBeanWithParams() { rewriteRun( + // Input source file before applying the recipe java( """ - import org.springframework.boot.test.mock.mockito.MockBean; + import org.springframework.boot.test.mock.mockito.MockBean; - public class SomeTest { + public class SomeTest { + @MockBean(name="bean1") + private String someService; + } + """, + // Expected output after applying the recipe + """ + import org.springframework.test.context.bean.override.mockito.MockitoBean; - @MockBean - @Deprecated - private String someService; - } - """, + public class SomeTest { + @MockitoBean(name="bean1") + private String someService; + } + """ + ) + ); + } + + @Test + void doesNotChangeOtherAnnotations() { + rewriteRun( + java( """ - import org.springframework.test.context.bean.override.mockito.MockitoBean; + import org.springframework.boot.test.mock.mockito.MockBean; - public class SomeTest { + public class SomeTest { - @MockitoBean - @Deprecated - private String someService; - } + @MockBean + @Deprecated + private String someService; + } + """, """ + import org.springframework.test.context.bean.override.mockito.MockitoBean; + + public class SomeTest { + + @MockitoBean + @Deprecated + private String someService; + } + """ ) ); } @@ -77,17 +133,17 @@ void handlesNoMockBeanImport() { rewriteRun( java( """ - public class SomeTest { - @org.springframework.boot.test.mock.mockito.MockBean - private String someService; - } - """, - """ - public class SomeTest { - @org.springframework.test.context.bean.override.mockito.MockitoBean - private String someService; - } + public class SomeTest { + @org.springframework.boot.test.mock.mockito.MockBean + private String someService; + } + """, """ + public class SomeTest { + @org.springframework.test.context.bean.override.mockito.MockitoBean + private String someService; + } + """ ) ); } @@ -98,30 +154,30 @@ void replacesMockBeanWithMockitoBeanAndSpyBeanWithMockitoSpyBean() { // Input source file before applying the recipe java( """ - import org.springframework.boot.test.mock.mockito.MockBean; - import org.springframework.boot.test.mock.mockito.SpyBean; + import org.springframework.boot.test.mock.mockito.MockBean; + import org.springframework.boot.test.mock.mockito.SpyBean; - public class SomeTest { - @SpyBean - private String someService; + public class SomeTest { + @SpyBean + private String someService; - @MockBean - private String someMockService; - } - """, + @MockBean + private String someMockService; + } + """, // Expected output after applying the recipe """ - import org.springframework.test.context.bean.override.mockito.MockitoBean; - import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; + import org.springframework.test.context.bean.override.mockito.MockitoBean; + import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; - public class SomeTest { - @MockitoSpyBean - private String someService; + public class SomeTest { + @MockitoSpyBean + private String someService; - @MockitoBean - private String someMockService; - } - """ + @MockitoBean + private String someMockService; + } + """ ) ); } @@ -132,22 +188,48 @@ void replacesSpyBeanWithMockitoSpyBean() { // Input source file before applying the recipe java( """ - import org.springframework.boot.test.mock.mockito.SpyBean; + import org.springframework.boot.test.mock.mockito.SpyBean; - public class SomeTest { - @SpyBean - private String someService; - } - """, + public class SomeTest { + @SpyBean + private String someService; + } + """, // Expected output after applying the recipe """ - import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; + import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; - public class SomeTest { - @MockitoSpyBean - private String someService; - } + public class SomeTest { + @MockitoSpyBean + private String someService; + } + """ + ) + ); + } + + @Test + void replacesSpyBeanWithMockitoSpyBeanwithAttributes() { + rewriteRun( + // Input source file before applying the recipe + java( + """ + import org.springframework.boot.test.mock.mockito.SpyBean; + + public class SomeTest { + @SpyBean(name="someName", classes=String.class, value=String.class, proxyTargetAware=true) + private String someService; + } + """, + // Expected output after applying the recipe """ + import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; + + public class SomeTest { + @MockitoSpyBean(name="someName") + private String someService; + } + """ ) ); } @@ -157,25 +239,25 @@ void doesNotChangeOtherAnnotationsSpyBean() { rewriteRun( java( """ - import org.springframework.boot.test.mock.mockito.SpyBean; + import org.springframework.boot.test.mock.mockito.SpyBean; - public class SomeTest { + public class SomeTest { - @SpyBean - @Deprecated - private String someService; - } - """, + @SpyBean + @Deprecated + private String someService; + } + """, """ - import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; + import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; - public class SomeTest { + public class SomeTest { - @MockitoSpyBean - @Deprecated - private String someService; - } - """ + @MockitoSpyBean + @Deprecated + private String someService; + } + """ ) ); } @@ -185,17 +267,17 @@ void handlesNoSpyBeanImport() { rewriteRun( java( """ - public class SomeTest { - @org.springframework.boot.test.mock.mockito.SpyBean - private String someService; - } - """, - """ - public class SomeTest { - @org.springframework.test.context.bean.override.mockito.MockitoSpyBean - private String someService; - } + public class SomeTest { + @org.springframework.boot.test.mock.mockito.SpyBean + private String someService; + } + """, """ + public class SomeTest { + @org.springframework.test.context.bean.override.mockito.MockitoSpyBean + private String someService; + } + """ ) ); } @@ -205,10 +287,10 @@ void doesNothingWhenNoAnnotationPresent() { rewriteRun( java( """ - public class SomeTest { - private String someService; - } - """ + public class SomeTest { + private String someService; + } + """ ) ); } From 4e054b647284bfdc0151bb27d906f5e86c5c5fd4 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Fri, 6 Dec 2024 15:49:31 +0100 Subject: [PATCH 3/3] Update src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../boot3/ReplaceMockBeanAndSpyBeanTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java b/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java index e9d79a566..afbc626ac 100644 --- a/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java +++ b/src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2024 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.openrewrite.java.spring.boot3; import org.junit.jupiter.api.Test;