diff --git a/drools-commands/pom.xml b/drools-commands/pom.xml
index 1568464ee93..2064c6d6937 100644
--- a/drools-commands/pom.xml
+++ b/drools-commands/pom.xml
@@ -55,11 +55,11 @@
jakarta.xml.bind-api
provided
-
- junit
- junit
- test
-
+
+ org.junit.jupiter
+ junit-jupiter
+ test
+
org.assertj
assertj-core
diff --git a/drools-commands/src/test/java/org/drools/commands/DeleteCommandTest.java b/drools-commands/src/test/java/org/drools/commands/DeleteCommandTest.java
index 18b43f716ab..9d760880658 100644
--- a/drools-commands/src/test/java/org/drools/commands/DeleteCommandTest.java
+++ b/drools-commands/src/test/java/org/drools/commands/DeleteCommandTest.java
@@ -22,9 +22,9 @@
import org.drools.commands.runtime.rule.InsertObjectCommand;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.runtime.Context;
import org.kie.api.runtime.ExecutableRunner;
import org.kie.api.runtime.KieSession;
@@ -40,7 +40,7 @@ public class DeleteCommandTest {
private ExecutableRunner runner;
private Context context;
- @Before
+ @BeforeEach
public void setup() {
InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
ksession = kbase.newKieSession();
@@ -48,7 +48,7 @@ public void setup() {
context = ((RegistryContext) runner.createContext()).register(KieSession.class, ksession);
}
- @After
+ @AfterEach
public void cleanUp() {
ksession.dispose();
}
diff --git a/drools-commands/src/test/java/org/drools/commands/ExecuteCommandDisconnectedTest.java b/drools-commands/src/test/java/org/drools/commands/ExecuteCommandDisconnectedTest.java
index 7e7c6084e5c..62bad906c15 100644
--- a/drools-commands/src/test/java/org/drools/commands/ExecuteCommandDisconnectedTest.java
+++ b/drools-commands/src/test/java/org/drools/commands/ExecuteCommandDisconnectedTest.java
@@ -25,7 +25,7 @@
import org.drools.core.common.DefaultFactHandle;
import org.drools.commands.runtime.ExecutionResultImpl;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.kie.api.KieBase;
import org.kie.api.command.BatchExecutionCommand;
import org.kie.api.runtime.ExecutableRunner;
diff --git a/drools-commands/src/test/java/org/drools/commands/FromExternalFactHandleCommandTest.java b/drools-commands/src/test/java/org/drools/commands/FromExternalFactHandleCommandTest.java
index 0960ea2c6b2..989629e9f7e 100644
--- a/drools-commands/src/test/java/org/drools/commands/FromExternalFactHandleCommandTest.java
+++ b/drools-commands/src/test/java/org/drools/commands/FromExternalFactHandleCommandTest.java
@@ -21,9 +21,8 @@
import org.drools.commands.runtime.rule.FromExternalFactHandleCommand;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
import org.kie.api.runtime.Context;
import org.kie.api.runtime.ExecutableRunner;
import org.kie.api.runtime.KieSession;
@@ -39,7 +38,7 @@ public class FromExternalFactHandleCommandTest {
private ExecutableRunner runner;
private Context context;
- @Before
+ @BeforeEach
public void setup() {
InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
ksession = kbase.newKieSession();
@@ -47,12 +46,12 @@ public void setup() {
context = ((RegistryContext) runner.createContext()).register(KieSession.class, ksession);
}
- @After
+ @AfterEach
public void cleanUp() {
ksession.dispose();
}
- @Test
+ @org.junit.jupiter.api.Test
public void testFromExternalFactHandleCommandNumberFormatException() {
// DROOLS-7076 : Just to test not to throw NumberFormatException
String externalFormat = "0:2147483648:171497379:-1361525545:2147483648:null:NON_TRAIT:java.lang.String";
diff --git a/drools-commands/src/test/java/org/drools/commands/GetFactHandlesCommandTest.java b/drools-commands/src/test/java/org/drools/commands/GetFactHandlesCommandTest.java
index 47b921efbf3..c4e70e3e9dd 100644
--- a/drools-commands/src/test/java/org/drools/commands/GetFactHandlesCommandTest.java
+++ b/drools-commands/src/test/java/org/drools/commands/GetFactHandlesCommandTest.java
@@ -27,9 +27,9 @@
import org.drools.core.common.InternalFactHandle;
import org.drools.kiesession.rulebase.InternalKnowledgeBase;
import org.drools.kiesession.rulebase.KnowledgeBaseFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.kie.api.runtime.Context;
import org.kie.api.runtime.ExecutableRunner;
import org.kie.api.runtime.KieSession;
@@ -47,7 +47,7 @@ public class GetFactHandlesCommandTest {
private Context context;
private Random random = new Random();
- @Before
+ @BeforeEach
public void setup() {
InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
ksession = kbase.newKieSession();
@@ -55,7 +55,7 @@ public void setup() {
context = ( (RegistryContext) runner.createContext() ).register( KieSession.class, ksession );
}
- @After
+ @AfterEach
public void cleanUp() {
ksession.dispose();
}
diff --git a/drools-commands/src/test/java/org/drools/commands/InternalExecutableTest.java b/drools-commands/src/test/java/org/drools/commands/InternalExecutableTest.java
index 22a0ad616c9..9600d118da2 100644
--- a/drools-commands/src/test/java/org/drools/commands/InternalExecutableTest.java
+++ b/drools-commands/src/test/java/org/drools/commands/InternalExecutableTest.java
@@ -25,7 +25,7 @@
import org.drools.commands.fluent.BatchImpl;
import org.drools.commands.fluent.InternalExecutable;
import org.drools.commands.impl.NotTransactionalCommand;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.kie.api.command.ExecutableCommand;
import org.kie.api.runtime.Context;