-
Notifications
You must be signed in to change notification settings - Fork 240
Description
Please provide the following information:
-
Version of JMockit that was used: 1.49
-
Description of the problem or enhancement request: When using open rewrite to convert jmockit to mockito framework, getting the following error - Caused by: java.lang.RuntimeException: Error while visiting itom-di-platform\itom-di-tenant-management\src\test\java\com\swgrp\itomdi\tenantmanagement\i
nit\TenantManagementApplicationInitializerTest.java: java.lang.IllegalArgumentException: No enum constant org.openrewrite.java.testing.jmockit.JMockitBl
ockType.VerificationsInOrder
java.base/java.lang.Enum.valueOf(Enum.java:273)
org.openrewrite.java.testing.jmockit.JMockitBlockType.valueOf(JMockitBlockType.java:20)
org.openrewrite.java.testing.jmockit.JMockitUtils.getJMockitBlock(JMockitUtils.java:46)
org.openrewrite.java.testing.jmockit.SetupStatementsRewriter.rewriteMethodBody(SetupStatementsRewriter.java:41)
org.openrewrite.java.testing.jmockit.JMockitBlockToMockito$RewriteJMockitBlockVisitor.visitMethodDeclaration(JMockitBlockToMockito.java:66)
org.openrewrite.java.testing.jmockit.JMockitBlockToMockito$RewriteJMockitBlockVisitor.visitMethodDeclaration(JMockitBlockToMockito.java:56)
org.openrewrite.java.tree.J$MethodDeclaration.acceptJava(J.java:3651)
org.openrewrite.java.tree.J.accept(J.java:59)
org.openrewrite.TreeVisitor.visit(TreeVisitor.java:248)
org.openrewrite.TreeVisitor.visitAndCast(TreeVisitor.java:318)
org.openrewrite.java.JavaVisitor.visitRightPadded(JavaVisitor.java:1365)
org.openrewrite.java.JavaVisitor.lambda$visitBlock$4(JavaVisitor.java:397)
org.openrewrite.internal.ListUtils.map(ListUtils.java:176)
org.openrewrite.java.JavaVisitor.visitBlock(JavaVisitor.java:396)
org.openrewrite.java.JavaIsoVisitor.visitBlock(JavaIsoVisitor.java:88)
org.openrewrite.java.JavaIsoVisitor.visitBlock(JavaIsoVisitor.java:30)
...
I am using maven as build tool. JDK 17
- Check the following:
-
If a defect or unexpected result, JMockit project members should be able to reproduce it.
For that, include an example test (perhaps accompanied by a Maven/Gradle build script) which
can be executed without changes and reproduces the failure. -
If an enhancement or new feature request, it should be justified by an example test
demonstrating the validity and usefulness of the desired enhancement or new feature. -
The issue does not fall outside the scope of the project (for example, attempting to use
JMockit APIs from Groovy or Scala code, or with an Android runtime). -
The JDK where the problem occurs is a final release, not a development build.