commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject [6/7] commons-scxml git commit: SCXML-283 Upgrade to JUnit Jupiter
Date Mon, 08 Oct 2018 13:48:23 GMT
SCXML-283 Upgrade to JUnit Jupiter

This PR migrates the project to the modern JUnit Jupiter 5.3.1
testing framework.
Since JUnit Jupiter is not backwards compatible to JUnit 4.x, or even
JUnit Vintage 5.x, the patch is a tad large, although most of the
changes are just cosmetic.

1. Maven changes:
 a. org.junit.jupiter:junit-jupiter-api was added to provide the new
    APIs used.
 b. org.junit.jupiter:junit-jupiter-engine was added as a testing
    engine. Its presence allows maven-surefire-plugin to use the
    Jupiter provider in order to execute tests.
 c. junit:junit was removed, as it's no longer in suse.

2. Annotations:
 a. org.junit.jupiter.api.Test was used as a drop in replacement for
    org.juit.Test without arguments. See 3.b for handling of the
    @Test annotation with an "expected" argument.
 b. org.junit.jupiter.api.BeforeEach was used as an drop in
    replacement for org.junit.Before.
 c. org.junit.jupiter.api.AfterEach was used as a drop in replacement
    for org.junit.After.
 d. org.junit.jupiter.api.BeforeAll was used as a drop in replacement
    for org.junit.BeforeClass.
 e. org.junit.jupiter.api.AfterAll was used as a drop in replacement
    for org.junit.AfterClass.

3. Assertions:
 a. org.junit.jupiter.api.Assertions' methods were used as a drop in
    replacements for org.junit.Assert's methods with the same name in
    the simple case of an assertion without a message.
    In the case of an assertion with a message,
    org.junit.jupiter.api.Assertions' methods were used, but the
    argument order was changed - Assert's methods take the message as
    the first argument, while Assertions' methods take the message as
    the last argument.
 b. org.junit.jupiter.api.Assertions#assertThrows was used to assert
    a specific exception was thrown instead of an org.junit.Test
    annotation with an "expected" argument. This technique has a side
    bonus of making the tests slightly stricter, as now they assert the
    exception was thrown from a specific line and prevent false
    posivites where the test's "set-up" code accidentally threw that
    exception. The throws clauses of these methods were cleaned up from
    exceptions that can no longer be thrown in order to avoid
    compilation warnings.


Project: http://git-wip-us.apache.org/repos/asf/commons-scxml/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-scxml/commit/d1900d37
Tree: http://git-wip-us.apache.org/repos/asf/commons-scxml/tree/d1900d37
Diff: http://git-wip-us.apache.org/repos/asf/commons-scxml/diff/d1900d37

Branch: refs/heads/master
Commit: d1900d3717dd2a94583249a0561467f9024872d5
Parents: 47c9ed3
Author: Allon Mureinik <allon@synopsys.com>
Authored: Thu Oct 4 13:59:39 2018 +0300
Committer: Allon Mureinik <allon@synopsys.com>
Committed: Thu Oct 4 21:38:04 2018 +0300

----------------------------------------------------------------------
 pom.xml                                         |  12 +-
 .../apache/commons/scxml2/EventDataTest.java    |  40 ++---
 .../apache/commons/scxml2/SCInstanceTest.java   |  34 ++--
 .../commons/scxml2/SCXMLExecutorTest.java       |  86 +++++-----
 .../apache/commons/scxml2/SCXMLTestHelper.java  |  50 +++---
 .../org/apache/commons/scxml2/StatusTest.java   |  24 +--
 .../apache/commons/scxml2/TieBreakerTest.java   |  42 ++---
 .../apache/commons/scxml2/TriggerEventTest.java |  36 ++--
 .../org/apache/commons/scxml2/WildcardTest.java |  16 +-
 .../org/apache/commons/scxml2/WizardsTest.java  |  42 ++---
 .../scxml2/env/AbstractSCXMLListenerTest.java   |  60 +++----
 .../scxml2/env/AbstractStateMachineTest.java    |   8 +-
 .../apache/commons/scxml2/env/LogUtilsTest.java |  10 +-
 .../commons/scxml2/env/SimpleContextTest.java   |  38 ++---
 .../commons/scxml2/env/StopWatchTest.java       |  24 +--
 .../scxml2/env/groovy/GroovyClosureTest.java    |   8 +-
 .../scxml2/env/groovy/GroovyContextTest.java    |  18 +-
 .../scxml2/env/groovy/GroovyEvaluatorTest.java  |  30 ++--
 .../SerializableInitialBaseScriptTest.java      |  12 +-
 .../scxml2/env/groovy/StaticMethodTest.java     |   8 +-
 .../scxml2/env/javascript/JSContextTest.java    |   8 +-
 .../scxml2/env/javascript/JSEvaluatorTest.java  |  78 ++++-----
 .../scxml2/env/javascript/JSExampleTest.java    |   8 +-
 .../env/javascript/JavaScriptEngineTest.java    |  12 +-
 .../commons/scxml2/env/jexl/ForeachTest.java    |   6 +-
 .../scxml2/env/jexl/JexlContextTest.java        |  12 +-
 .../scxml2/env/jexl/JexlEvaluatorTest.java      |  18 +-
 .../scxml2/env/jexl/StaticMethodTest.java       |   8 +-
 .../scxml2/invoke/InvokeParamNameTest.java      |  24 +--
 .../commons/scxml2/invoke/InvokeTest.java       |  12 +-
 .../commons/scxml2/io/ContentParserTest.java    |  42 ++---
 .../commons/scxml2/io/SCXMLReaderTest.java      | 163 ++++++++++---------
 .../scxml2/io/SCXMLRequiredAttributesTest.java  |   8 +-
 .../commons/scxml2/io/SCXMLWriterTest.java      |  12 +-
 .../apache/commons/scxml2/io/StateSrcTest.java  |  26 +--
 .../commons/scxml2/issues/Issue112Test.java     |  14 +-
 .../commons/scxml2/issues/Issue62Test.java      |  14 +-
 .../commons/scxml2/issues/Issue64Test.java      |   2 +-
 .../apache/commons/scxml2/model/ActionTest.java |  16 +-
 .../commons/scxml2/model/ActionsTest.java       |   9 +-
 .../apache/commons/scxml2/model/AssignTest.java |  16 +-
 .../apache/commons/scxml2/model/CancelTest.java |   2 +-
 .../commons/scxml2/model/CustomActionTest.java  |  60 ++++---
 .../commons/scxml2/model/DatamodelTest.java     |  42 ++---
 .../commons/scxml2/model/HistoryTest.java       |  50 +++---
 .../commons/scxml2/model/ParallelTest.java      |  10 +-
 .../apache/commons/scxml2/model/ScriptTest.java |  12 +-
 .../scxml2/model/ScxmlInitialAttributeTest.java |  14 +-
 .../apache/commons/scxml2/model/SendTest.java   |  54 +++---
 .../apache/commons/scxml2/model/StateTest.java  |  36 ++--
 .../scxml2/model/StatelessModelTest.java        |  58 +++----
 .../scxml2/model/TransitionTargetTest.java      |  12 +-
 .../commons/scxml2/model/TransitionTest.java    |  14 +-
 .../semantics/SCXMLSemanticsImplTest.java       |  24 +--
 54 files changed, 750 insertions(+), 744 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3fcd13b..4bffc09 100644
--- a/pom.xml
+++ b/pom.xml
@@ -170,9 +170,15 @@
       <optional>true</optional>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.12</version>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-api</artifactId>
+      <version>5.3.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <version>5.3.1</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/EventDataTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/EventDataTest.java b/src/test/java/org/apache/commons/scxml2/EventDataTest.java
index baa5f67..19b2c7f 100644
--- a/src/test/java/org/apache/commons/scxml2/EventDataTest.java
+++ b/src/test/java/org/apache/commons/scxml2/EventDataTest.java
@@ -21,8 +21,8 @@ import java.util.Set;
 import org.apache.commons.scxml2.env.Tracer;
 import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.SCXML;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 /**
  * Unit tests {@link org.apache.commons.scxml2.SCXMLExecutor}.
  * Testing special variable "_event.data"
@@ -37,21 +37,21 @@ public class EventDataTest {
     	SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/env/jexl/eventdata-01.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state1", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state1", currentStates.iterator().next().getId());
         TriggerEvent te = new EventBuilder("event.foo", TriggerEvent.SIGNAL_EVENT).data(3).build();
         currentStates = SCXMLTestHelper.fireEvent(exec, te);
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state3", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state3", currentStates.iterator().next().getId());
         TriggerEvent[] evts = new TriggerEvent[] { te,
             new EventBuilder("event.bar", TriggerEvent.SIGNAL_EVENT).data(6).build()};
         currentStates = SCXMLTestHelper.fireEvents(exec, evts);
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state6", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state6", currentStates.iterator().next().getId());
         te = new EventBuilder("event.baz", TriggerEvent.SIGNAL_EVENT).data(7).build();
         currentStates = SCXMLTestHelper.fireEvent(exec, te);
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state7", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state7", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -59,17 +59,17 @@ public class EventDataTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/env/jexl/eventdata-02.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state0", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state0", currentStates.iterator().next().getId());
         TriggerEvent te1 = new EventBuilder("connection.alerting", TriggerEvent.SIGNAL_EVENT).data("line2").build();
         currentStates = SCXMLTestHelper.fireEvent(exec, te1);
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state2", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state2", currentStates.iterator().next().getId());
         TriggerEvent te2 = new EventBuilder("connection.alerting", TriggerEvent.SIGNAL_EVENT)
                 .data(new ConnectionAlertingPayload(4)).build();
         currentStates = SCXMLTestHelper.fireEvent(exec, te2);
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state4", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state4", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -77,12 +77,12 @@ public class EventDataTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/env/jexl/eventdata-03.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("ten", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("ten", currentStates.iterator().next().getId());
         TriggerEvent te = new EventBuilder("event.foo", TriggerEvent.SIGNAL_EVENT).build();
         currentStates = SCXMLTestHelper.fireEvent(exec, te);
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("thirty", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("thirty", currentStates.iterator().next().getId());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/SCInstanceTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/SCInstanceTest.java b/src/test/java/org/apache/commons/scxml2/SCInstanceTest.java
index 4ef8706..4078f0b 100644
--- a/src/test/java/org/apache/commons/scxml2/SCInstanceTest.java
+++ b/src/test/java/org/apache/commons/scxml2/SCInstanceTest.java
@@ -24,16 +24,16 @@ import org.apache.commons.scxml2.env.jexl.JexlEvaluator;
 import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.History;
 import org.apache.commons.scxml2.model.State;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 public class SCInstanceTest {
 
     private SCXMLExecutor executor;
     private SCInstance instance;
     
-    @Before
+    @BeforeEach
     public void setUp() {
         executor = new SCXMLExecutor();
         instance = executor.getSCInstance();
@@ -45,7 +45,7 @@ public class SCInstanceTest {
         context.set("name", "value");
         
         instance.setRootContext(context);
-        Assert.assertEquals("value", instance.getRootContext().get("name"));
+        Assertions.assertEquals("value", instance.getRootContext().get("name"));
     }
     
     @Test
@@ -58,7 +58,7 @@ public class SCInstanceTest {
         
         instance.setContext(target, context);
         
-        Assert.assertEquals("value", instance.getContext(target).get("name"));
+        Assertions.assertEquals("value", instance.getContext(target).get("name"));
     }
     
     @Test
@@ -73,8 +73,8 @@ public class SCInstanceTest {
         Evaluator evaluator = new JexlEvaluator();
         executor.setEvaluator(evaluator);
 
-        Assert.assertEquals("value", instance.getContext(target).get("name"));
-        Assert.assertEquals("value", instance.lookupContext(target).get("name"));
+        Assertions.assertEquals("value", instance.getContext(target).get("name"));
+        Assertions.assertEquals("value", instance.lookupContext(target).get("name"));
     }
 
     @Test
@@ -94,8 +94,8 @@ public class SCInstanceTest {
         Evaluator evaluator = new JexlEvaluator();
         executor.setEvaluator(evaluator);
 
-        Assert.assertEquals("value", instance.getContext(target).get("name"));
-        Assert.assertEquals("value", instance.lookupContext(target).get("name"));
+        Assertions.assertEquals("value", instance.getContext(target).get("name"));
+        Assertions.assertEquals("value", instance.lookupContext(target).get("name"));
     }
 
     @Test
@@ -104,7 +104,7 @@ public class SCInstanceTest {
         
         Set<EnterableState> returnConfiguration = instance.getLastConfiguration(history);
         
-        Assert.assertEquals(0, returnConfiguration.size());
+        Assertions.assertEquals(0, returnConfiguration.size());
     }
 
     @Test
@@ -122,14 +122,14 @@ public class SCInstanceTest {
         
         Set<EnterableState> returnConfiguration = instance.getLastConfiguration(history);
         
-        Assert.assertEquals(2, returnConfiguration.size());
-        Assert.assertTrue(returnConfiguration.contains(tt1));
-        Assert.assertTrue(returnConfiguration.contains(tt2));
+        Assertions.assertEquals(2, returnConfiguration.size());
+        Assertions.assertTrue(returnConfiguration.contains(tt1));
+        Assertions.assertTrue(returnConfiguration.contains(tt2));
     }
     
     @Test
     public void testIsEmpty() {
-        Assert.assertTrue(instance.getLastConfiguration(new History()).isEmpty());
+        Assertions.assertTrue(instance.getLastConfiguration(new History()).isEmpty());
     }
     
     @Test
@@ -143,7 +143,7 @@ public class SCInstanceTest {
         
         instance.setLastConfiguration(history, configuration);  
 
-        Assert.assertFalse(instance.getLastConfiguration(history).isEmpty());
+        Assertions.assertFalse(instance.getLastConfiguration(history).isEmpty());
     }
     
     @Test
@@ -159,7 +159,7 @@ public class SCInstanceTest {
 
         instance.resetConfiguration(history);
         
-        Assert.assertTrue(instance.getLastConfiguration(history).isEmpty());
+        Assertions.assertTrue(instance.getLastConfiguration(history).isEmpty());
     }
     
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java b/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java
index 425ad8b..c48547c 100644
--- a/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java
+++ b/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java
@@ -23,8 +23,8 @@ import java.util.Set;
 
 import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.TransitionTarget;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 /**
  * Unit tests {@link org.apache.commons.scxml2.SCXMLExecutor}.
  */
@@ -108,11 +108,11 @@ public class SCXMLExecutorTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/prefix-01.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("ten", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("ten", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("twenty", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("twenty", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -120,13 +120,13 @@ public class SCXMLExecutorTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/transitions-01.xml");
         exec.go();
         Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("twenty_one", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("twenty_one", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.twenty_one");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("twenty_two", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("twenty_two", currentStates.iterator().next().getId());
         SCXMLTestHelper.fireEvent(exec, "done.state.twenty_two");
-        Assert.assertEquals(3, exec.getStatus().getStates().size());
+        Assertions.assertEquals(3, exec.getStatus().getStates().size());
     }
 
     @Test
@@ -134,15 +134,15 @@ public class SCXMLExecutorTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/transitions-02.xml");
         exec.go();
         Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "ten.stay");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("ten", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("ten", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testInstanceSerializability(exec);
         currentStates = SCXMLTestHelper.fireEvent(exec, "ten.self");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("ten", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("ten", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("twenty", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("twenty", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -150,14 +150,14 @@ public class SCXMLExecutorTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/transitions-03.xml");
         exec.go();
         Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(3, currentStates.size());
+        Assertions.assertEquals(3, currentStates.size());
         Set<String> expected = new HashSet<>();
         expected.add("twenty_one_2");
         expected.add("twenty_two_2");
         expected.add("twenty_three_2");
         for (TransitionTarget tt : currentStates) {
             if (!expected.remove(tt.getId())) {
-                Assert.fail("'" + tt.getId()
+                Assertions.fail("'" + tt.getId()
                     + "' is not an expected current state ID");
             }
         }
@@ -168,20 +168,20 @@ public class SCXMLExecutorTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/transitions-04.xml");
         exec.go();
         Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(3, currentStates.size());
+        Assertions.assertEquals(3, currentStates.size());
         Set<String> expected = new HashSet<>();
         expected.add("twenty_one_1");
         expected.add("twenty_two_1");
         expected.add("twenty_three_1");
         for (TransitionTarget tt : currentStates) {
             if (!expected.remove(tt.getId())) {
-                Assert.fail("'" + tt.getId()
+                Assertions.fail("'" + tt.getId()
                     + "' is not an expected current state ID");
             }
         }
         currentStates = SCXMLTestHelper.fireEvent(exec, "bar");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("thirty", (currentStates.iterator().
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("thirty", (currentStates.iterator().
             next()).getId());
     }
 
@@ -207,11 +207,11 @@ public class SCXMLExecutorTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/send-01.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("ten", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("ten", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("twenty", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("twenty", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -219,9 +219,9 @@ public class SCXMLExecutorTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/send-02.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("ninety", currentStates.iterator().next().getId());
-        Assert.assertTrue(exec.getStatus().isFinal());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("ninety", currentStates.iterator().next().getId());
+        Assertions.assertTrue(exec.getStatus().isFinal());
     }
 
     @Test
@@ -267,38 +267,38 @@ public class SCXMLExecutorTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/transitions-01.xml");
         exec.go();
         Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("twenty_one", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("twenty_one", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.twenty_one");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("twenty_two", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("twenty_two", currentStates.iterator().next().getId());
         Set<String> stateIds = new HashSet<>();
         stateIds.add("twenty_one");
         exec.setConfiguration(stateIds);
-        Assert.assertEquals(1, exec.getStatus().getStates().size());
+        Assertions.assertEquals(1, exec.getStatus().getStates().size());
         SCXMLTestHelper.fireEvent(exec, "done.state.twenty_one");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("twenty_two", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("twenty_two", currentStates.iterator().next().getId());
     }
 
     @Test
     public void testSCXMLExecutorFinalDoneData() throws Exception {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/final-donedata.xml");
-        Assert.assertNull(exec.getFinalDoneData());
+        Assertions.assertNull(exec.getFinalDoneData());
         exec.go();
-        Assert.assertEquals("done", exec.getFinalDoneData());
+        Assertions.assertEquals("done", exec.getFinalDoneData());
     }
 
     private void checkMicrowave01Sample(SCXMLExecutor exec) throws Exception {
         Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "turn_on");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("cooking", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("cooking", currentStates.iterator().next().getId());
     }
 
     private void checkMicrowave02Sample(SCXMLExecutor exec) throws Exception {
         Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "turn_on");
-        Assert.assertEquals(2, currentStates.size());
+        Assertions.assertEquals(2, currentStates.size());
         String id = (currentStates.iterator().next()).getId();
-        Assert.assertTrue(id.equals("closed") || id.equals("cooking"));
+        Assertions.assertTrue(id.equals("closed") || id.equals("cooking"));
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/SCXMLTestHelper.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/SCXMLTestHelper.java b/src/test/java/org/apache/commons/scxml2/SCXMLTestHelper.java
index 62039b9..65911f8 100644
--- a/src/test/java/org/apache/commons/scxml2/SCXMLTestHelper.java
+++ b/src/test/java/org/apache/commons/scxml2/SCXMLTestHelper.java
@@ -36,7 +36,7 @@ import org.apache.commons.scxml2.model.CustomAction;
 import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.SCXML;
 import org.apache.commons.scxml2.model.TransitionTarget;
-import org.junit.Assert;
+import org.junit.jupiter.api.Assertions;
 
 /**
  * Helper methods for running SCXML unit tests.
@@ -64,7 +64,7 @@ public class SCXMLTestHelper {
     }
 
     public static SCXML parse(final String scxmlResource) throws Exception {
-        Assert.assertNotNull(scxmlResource);
+        Assertions.assertNotNull(scxmlResource);
         return parse(getResource(scxmlResource), null);
     }
 
@@ -73,23 +73,23 @@ public class SCXMLTestHelper {
     }
 
     public static SCXML parse(final String scxmlResource, final List<CustomAction> customActions) throws Exception {
-        Assert.assertNotNull(scxmlResource);
+        Assertions.assertNotNull(scxmlResource);
         return parse(getResource(scxmlResource), customActions);
     }
 
     public static SCXML parse(final URL url, final List<CustomAction> customActions) throws Exception {
-        Assert.assertNotNull(url);
+        Assertions.assertNotNull(url);
         Configuration configuration = new Configuration(null, null, customActions);
         SCXML scxml = SCXMLReader.read(url, configuration);
-        Assert.assertNotNull(scxml);
+        Assertions.assertNotNull(scxml);
         return testModelSerializability(scxml);
     }
 
     public static SCXML parse(final Reader scxmlReader, final List<CustomAction> customActions) throws Exception {
-        Assert.assertNotNull(scxmlReader);
+        Assertions.assertNotNull(scxmlReader);
         Configuration configuration = new Configuration(null, null, customActions);
         SCXML scxml = SCXMLReader.read(scxmlReader, configuration);
-        Assert.assertNotNull(scxml);
+        Assertions.assertNotNull(scxml);
         return testModelSerializability(scxml);
     }
 
@@ -135,10 +135,10 @@ public class SCXMLTestHelper {
 
     public static void assertState(SCXMLExecutor exec, String expectedStateId) {
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals("Expected 1 simple (leaf) state with id '"
-            + expectedStateId + "' but found " + currentStates.size() + " states instead.",
-            1, currentStates.size());
-        Assert.assertEquals(expectedStateId, currentStates.iterator().
+        Assertions.assertEquals(1, currentStates.size(),
+                "Expected 1 simple (leaf) state with id '" + expectedStateId +
+                        "' but found " + currentStates.size() + " states instead.");
+        Assertions.assertEquals(expectedStateId, currentStates.iterator().
             next().getId());
     }
 
@@ -187,38 +187,38 @@ public class SCXMLTestHelper {
     public static void assertPostTriggerState(SCXMLExecutor exec,
             TriggerEvent triggerEvent, String expectedStateId) throws Exception {
         Set<EnterableState> currentStates = fireEvent(exec, triggerEvent);
-        Assert.assertEquals("Expected 1 simple (leaf) state with id '"
-            + expectedStateId + "' on firing event " + triggerEvent
-            + " but found " + currentStates.size() + " states instead.",
-            1, currentStates.size());
-        Assert.assertEquals(expectedStateId, currentStates.iterator().
+        Assertions.assertEquals(1, currentStates.size(),
+                "Expected 1 simple (leaf) state with id '"
+                        + expectedStateId + "' on firing event " + triggerEvent
+                        + " but found " + currentStates.size() + " states instead.");
+        Assertions.assertEquals(expectedStateId, currentStates.iterator().
             next().getId());
     }
 
     public static void assertPostTriggerStates(SCXMLExecutor exec,
             TriggerEvent triggerEvent, String[] expectedStateIds) throws Exception {
         if (expectedStateIds == null || expectedStateIds.length == 0) {
-            Assert.fail("Must specify an array of one or more "
+            Assertions.fail("Must specify an array of one or more "
                 + "expected state IDs");
         }
         Set<EnterableState> currentStates = fireEvent(exec, triggerEvent);
         int n = expectedStateIds.length;
-        Assert.assertEquals("Expected " + n + " simple (leaf) state(s) "
-            + " on firing event " + triggerEvent + " but found "
-            + currentStates.size() + " states instead.",
-            n, currentStates.size());
+        Assertions.assertEquals(n, currentStates.size(),
+                "Expected " + n + " simple (leaf) state(s) "
+                        + " on firing event " + triggerEvent + " but found "
+                        + currentStates.size() + " states instead.");
         List<String> expectedStateIdList = new ArrayList<>(Arrays.asList(expectedStateIds));
         for (TransitionTarget tt : currentStates) {
             String stateId = tt.getId();
             if(!expectedStateIdList.remove(stateId)) {
-                Assert.fail("Expected state with id '" + stateId
+                Assertions.fail("Expected state with id '" + stateId
                     + "' in current states on firing event "
                     + triggerEvent);
             }
         }
-        Assert.assertEquals("More states in current configuration than those"
-            + "specified in the expected state ids '" + Arrays.toString(expectedStateIds)
-            + "'", 0, expectedStateIdList.size());
+        Assertions.assertEquals(0, expectedStateIdList.size(),
+                "More states in current configuration than those"
+                        + "specified in the expected state ids '" + Arrays.toString(expectedStateIds) + "'");
     }
 
     public static SCXML testModelSerializability(final SCXML scxml) throws Exception {

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/StatusTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/StatusTest.java b/src/test/java/org/apache/commons/scxml2/StatusTest.java
index 4816060..4c86ced 100644
--- a/src/test/java/org/apache/commons/scxml2/StatusTest.java
+++ b/src/test/java/org/apache/commons/scxml2/StatusTest.java
@@ -21,16 +21,16 @@ import java.util.Set;
 import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.Final;
 import org.apache.commons.scxml2.model.State;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 public class StatusTest {
 
     private StateConfiguration stateConfiguration;
     private Status status;
     
-    @Before
+    @BeforeEach
     public void setUp() {
         stateConfiguration = new StateConfiguration();
         status = new Status(stateConfiguration);
@@ -42,7 +42,7 @@ public class StatusTest {
 
         stateConfiguration.enterState(state);
         
-        Assert.assertFalse(status.isFinal());
+        Assertions.assertFalse(status.isFinal());
     }
     
     @Test
@@ -52,7 +52,7 @@ public class StatusTest {
         
         stateConfiguration.enterState(state);
 
-        Assert.assertFalse(status.isFinal());
+        Assertions.assertFalse(status.isFinal());
     }
     
     @Test
@@ -61,7 +61,7 @@ public class StatusTest {
 
         stateConfiguration.enterState(state);
 
-        Assert.assertTrue(status.isFinal());
+        Assertions.assertTrue(status.isFinal());
     }
 
     @Test
@@ -69,7 +69,7 @@ public class StatusTest {
 
         Set<EnterableState> returnValue = status.getActiveStates();
 
-        Assert.assertEquals(0, returnValue.size());
+        Assertions.assertEquals(0, returnValue.size());
     }
 
     @Test
@@ -84,7 +84,7 @@ public class StatusTest {
 
         Set<EnterableState> returnValue = status.getActiveStates();
 
-        Assert.assertEquals(2, returnValue.size());
+        Assertions.assertEquals(2, returnValue.size());
     }
 
     @Test
@@ -96,8 +96,8 @@ public class StatusTest {
         state.setId("1");
         state.setParent(parent);
         stateConfiguration.enterState(state);
-        Assert.assertTrue(status.isInState("0"));
-        Assert.assertTrue(status.isInState("1"));
-        Assert.assertFalse(status.isInState("2"));
+        Assertions.assertTrue(status.isInState("0"));
+        Assertions.assertTrue(status.isInState("1"));
+        Assertions.assertFalse(status.isInState("2"));
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/TieBreakerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/TieBreakerTest.java b/src/test/java/org/apache/commons/scxml2/TieBreakerTest.java
index 383159c..959587a 100644
--- a/src/test/java/org/apache/commons/scxml2/TieBreakerTest.java
+++ b/src/test/java/org/apache/commons/scxml2/TieBreakerTest.java
@@ -20,8 +20,8 @@ import java.util.Set;
 
 import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.TransitionTarget;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 /**
  * Unit tests for testing conflict resolution amongst multiple transitions
  * within the {@link org.apache.commons.scxml2.SCXMLExecutor}'s default
@@ -41,11 +41,11 @@ public class TieBreakerTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/tie-breaker-01.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("ten", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("ten", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("twenty", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("twenty", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -53,11 +53,11 @@ public class TieBreakerTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/tie-breaker-02.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("eleven", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("eleven", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("thirty", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("thirty", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -65,11 +65,11 @@ public class TieBreakerTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/tie-breaker-03.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("eleven", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("eleven", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "done.state.ten");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("forty", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("forty", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -77,9 +77,9 @@ public class TieBreakerTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/tie-breaker-04.xml");
         exec.go();
         Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "event_2");
-        Assert.assertEquals(1, currentStates.size());
+        Assertions.assertEquals(1, currentStates.size());
         currentStates = SCXMLTestHelper.fireEvent(exec, "event_1");
-        Assert.assertEquals(1, currentStates.size());
+        Assertions.assertEquals(1, currentStates.size());
     }
 
     @Test
@@ -87,17 +87,17 @@ public class TieBreakerTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/tie-breaker-05.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(3, currentStates.size());
+        Assertions.assertEquals(3, currentStates.size());
         for (TransitionTarget tt : currentStates) {
             String id = tt.getId();
-            Assert.assertTrue(id.equals("s11") || id.equals("s212")
+            Assertions.assertTrue(id.equals("s11") || id.equals("s212")
                 || id.equals("s2111"));
         }
         currentStates = SCXMLTestHelper.fireEvent(exec, "event1");
-        Assert.assertEquals(3, currentStates.size());
+        Assertions.assertEquals(3, currentStates.size());
         for (TransitionTarget tt : currentStates) {
             String id = tt.getId();
-            Assert.assertTrue(id.equals("s12") || id.equals("s212")
+            Assertions.assertTrue(id.equals("s12") || id.equals("s212")
                 || id.equals("s2112"));
         }
     }
@@ -107,6 +107,6 @@ public class TieBreakerTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/tie-breaker-06.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
+        Assertions.assertEquals(1, currentStates.size());
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/TriggerEventTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/TriggerEventTest.java b/src/test/java/org/apache/commons/scxml2/TriggerEventTest.java
index 24ba809..29bea82 100644
--- a/src/test/java/org/apache/commons/scxml2/TriggerEventTest.java
+++ b/src/test/java/org/apache/commons/scxml2/TriggerEventTest.java
@@ -19,10 +19,10 @@ package org.apache.commons.scxml2;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests {@link org.apache.commons.scxml2.TriggerEvent}.
@@ -37,7 +37,7 @@ public class TriggerEventTest {
     /**
      * Set up instance variables required by this test case.
      */
-    @Before
+    @BeforeEach
     public void setUp() {
         payloadData = new HashMap<>();
         payloadData.put("property1", "value1");
@@ -55,7 +55,7 @@ public class TriggerEventTest {
     /**
      * Tear down instance variables required by this test case.
      */
-    @After
+    @AfterEach
     public void tearDown() {
         payloadData.clear();
         payloadData = null;
@@ -68,32 +68,32 @@ public class TriggerEventTest {
      */
     @Test
     public void testTriggerEventGetters() {
-        Assert.assertEquals("name1", te1.getName());
-        Assert.assertEquals(2, te2.getType());
-        Assert.assertNull(te7.getData());
+        Assertions.assertEquals("name1", te1.getName());
+        Assertions.assertEquals(2, te2.getType());
+        Assertions.assertNull(te7.getData());
     }
 
     @Test
     public void testTriggerEventEquals() {
-        Assert.assertEquals(te1, te2);
-        Assert.assertEquals(te3, te4);
-        Assert.assertEquals(te5, te6);
-        Assert.assertNotEquals(te1, te4);
-        Assert.assertNotNull(te7);
+        Assertions.assertEquals(te1, te2);
+        Assertions.assertEquals(te3, te4);
+        Assertions.assertEquals(te5, te6);
+        Assertions.assertNotEquals(te1, te4);
+        Assertions.assertNotNull(te7);
     }
 
     @Test
     public void testTriggerEventToString() {
-        Assert.assertEquals("TriggerEvent{name=name3, type=4}", te7.toString());
-        Assert.assertEquals("TriggerEvent{name=name1, type=2, data="
+        Assertions.assertEquals("TriggerEvent{name=name3, type=4}", te7.toString());
+        Assertions.assertEquals("TriggerEvent{name=name1, type=2, data="
             + "{property1=value1}}", te2.toString());
     }
 
     @Test
     public void testTriggerEventHashCode() {
-        Assert.assertEquals("TriggerEvent{name=name3, type=4}".hashCode(),
+        Assertions.assertEquals("TriggerEvent{name=name3, type=4}".hashCode(),
             te7.hashCode());
-        Assert.assertEquals("TriggerEvent{name=name3, type=3}".hashCode(),
+        Assertions.assertEquals("TriggerEvent{name=name3, type=3}".hashCode(),
             te5.hashCode());
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/WildcardTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/WildcardTest.java b/src/test/java/org/apache/commons/scxml2/WildcardTest.java
index 4470860..671627c 100644
--- a/src/test/java/org/apache/commons/scxml2/WildcardTest.java
+++ b/src/test/java/org/apache/commons/scxml2/WildcardTest.java
@@ -19,8 +19,8 @@ package org.apache.commons.scxml2;
 import java.util.Set;
 
 import org.apache.commons.scxml2.model.EnterableState;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 /**
  * Unit tests {@link org.apache.commons.scxml2.SCXMLExecutor}.
  * Testing wildcard event matching (*)
@@ -35,12 +35,12 @@ public class WildcardTest {
     	SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/env/jexl/wildcard-01.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state1", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state1", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testInstanceSerializability(exec);
         currentStates = SCXMLTestHelper.fireEvent(exec, "foo.bar.baz");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state4", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state4", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -48,7 +48,7 @@ public class WildcardTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/env/jexl/wildcard-02.xml");
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state2", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state2", currentStates.iterator().next().getId());
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/WizardsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/WizardsTest.java b/src/test/java/org/apache/commons/scxml2/WizardsTest.java
index c134153..438a713 100644
--- a/src/test/java/org/apache/commons/scxml2/WizardsTest.java
+++ b/src/test/java/org/apache/commons/scxml2/WizardsTest.java
@@ -22,8 +22,8 @@ import java.util.Set;
 import org.apache.commons.scxml2.env.SimpleDispatcher;
 import org.apache.commons.scxml2.model.EnterableState;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests
@@ -37,24 +37,24 @@ public class WizardsTest {
     public void testWizard01Sample() throws Exception {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor("org/apache/commons/scxml2/env/jexl/wizard-01.xml");
         exec.go();
-        Assert.assertNotNull(exec);
+        Assertions.assertNotNull(exec);
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state1", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state1", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testInstanceSerializability(exec);
         currentStates = SCXMLTestHelper.fireEvent(exec, "event2");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state2", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state2", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "event4");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state4", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state4", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "event3");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state3", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state3", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testInstanceSerializability(exec);
         currentStates = SCXMLTestHelper.fireEvent(exec, "event3"); // ensure we stay put
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state3", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state3", currentStates.iterator().next().getId());
     }
 
     @Test
@@ -65,12 +65,12 @@ public class WizardsTest {
         // If you change this, you must also change
         // the TestEventDispatcher
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state2", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state2", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testInstanceSerializability(exec);
         currentStates = SCXMLTestHelper.fireEvent(exec, "event4");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state4", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state4", currentStates.iterator().next().getId());
     }
 
     static class TestEventDispatcher extends SimpleDispatcher {
@@ -86,15 +86,15 @@ public class WizardsTest {
                 int i = ((Integer) params.get("aValue"));
                 switch (callback) {
                     case 0:
-                        Assert.assertTrue(i == 2); // state2
+                        Assertions.assertTrue(i == 2); // state2
                         callback++;
                         break;
                     case 1:
-                        Assert.assertTrue(i == 4); // state4
+                        Assertions.assertTrue(i == 4); // state4
                         callback++;
                         break;
                     default:
-                        Assert.fail("More than 2 TestEventDispatcher <send> callbacks for type \"foo\"");
+                        Assertions.fail("More than 2 TestEventDispatcher <send> callbacks for type \"foo\"");
                 }
             }
             else {
@@ -103,7 +103,7 @@ public class WizardsTest {
         }
         public void cancel(String sendId) {
             // should never be called
-            Assert.fail("<cancel> TestEventDispatcher callback unexpected");
+            Assertions.fail("<cancel> TestEventDispatcher callback unexpected");
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/AbstractSCXMLListenerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/AbstractSCXMLListenerTest.java b/src/test/java/org/apache/commons/scxml2/env/AbstractSCXMLListenerTest.java
index 137fc78..9a54322 100644
--- a/src/test/java/org/apache/commons/scxml2/env/AbstractSCXMLListenerTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/AbstractSCXMLListenerTest.java
@@ -21,10 +21,10 @@ import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.State;
 import org.apache.commons.scxml2.model.Transition;
 import org.apache.commons.scxml2.model.TransitionTarget;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests {@link org.apache.commons.scxml2.env.AbstractSCXMLListener}.
@@ -42,7 +42,7 @@ public class AbstractSCXMLListenerTest {
     /**
      * Set up instance variables required by this test case.
      */
-    @Before
+    @BeforeEach
     public void setUp() {
         to = new State();
         from = new State();
@@ -55,7 +55,7 @@ public class AbstractSCXMLListenerTest {
     /**
      * Tear down instance variables required by this test case.
      */
-    @After
+    @AfterEach
     public void tearDown() {
         to = null;
         from = null;
@@ -91,15 +91,15 @@ public class AbstractSCXMLListenerTest {
                 }
             };
 
-        Assert.assertFalse("heardOnEntry == false", heardOnEntry);
-        Assert.assertFalse("heardOnExit == false", heardOnExit);
-        Assert.assertFalse("heardOnTransition == false", heardOnTransition);
+        Assertions.assertFalse(heardOnEntry, "heardOnEntry == false");
+        Assertions.assertFalse(heardOnExit, "heardOnExit == false");
+        Assertions.assertFalse(heardOnTransition, "heardOnTransition == false");
         listener0.onEntry(to);
         listener0.onExit(to);
         listener0.onTransition(from, to, transition, null);
-        Assert.assertTrue("heardOnEntry", heardOnEntry);
-        Assert.assertTrue("heardOnExit", heardOnExit);
-        Assert.assertTrue("heardOnTransition", heardOnTransition);
+        Assertions.assertTrue(heardOnEntry, "heardOnEntry");
+        Assertions.assertTrue(heardOnExit, "heardOnExit");
+        Assertions.assertTrue(heardOnTransition, "heardOnTransition");
     }
 
     @Test
@@ -122,15 +122,15 @@ public class AbstractSCXMLListenerTest {
                 }
             };
 
-        Assert.assertFalse("heardOnEntry == false", heardOnEntry);
-        Assert.assertFalse("heardOnExit == false", heardOnExit);
-        Assert.assertFalse("heardOnTransition == false", heardOnTransition);
+        Assertions.assertFalse(heardOnEntry, "heardOnEntry == false");
+        Assertions.assertFalse(heardOnExit, "heardOnExit == false");
+        Assertions.assertFalse(heardOnTransition, "heardOnTransition == false");
         listener1.onEntry(to);
         listener1.onExit(to);
         listener1.onTransition(from, to, transition, null);
-        Assert.assertTrue("heardOnEntry", heardOnEntry);
-        Assert.assertTrue("heardOnExit", heardOnExit);
-        Assert.assertFalse("heardOnTransition == false", heardOnTransition);
+        Assertions.assertTrue(heardOnEntry, "heardOnEntry");
+        Assertions.assertTrue(heardOnExit, "heardOnExit");
+        Assertions.assertFalse(heardOnTransition, "heardOnTransition == false");
     }
 
     @Test
@@ -145,15 +145,15 @@ public class AbstractSCXMLListenerTest {
                 }
             };
 
-            Assert.assertFalse("heardOnEntry == false", heardOnEntry);
-            Assert.assertFalse("heardOnExit == false", heardOnExit);
-            Assert.assertFalse("heardOnTransition == false", heardOnTransition);
+            Assertions.assertFalse(heardOnEntry, "heardOnEntry == false");
+            Assertions.assertFalse(heardOnExit, "heardOnExit == false");
+            Assertions.assertFalse(heardOnTransition, "heardOnTransition == false");
         listener2.onEntry(to);
         listener2.onExit(to);
         listener2.onTransition(from, to, transition, null);
-        Assert.assertTrue("heardOnEntry", heardOnEntry);
-        Assert.assertFalse("heardOnExit == false", heardOnExit);
-        Assert.assertFalse("heardOnTransition == false", heardOnTransition);
+        Assertions.assertTrue(heardOnEntry, "heardOnEntry");
+        Assertions.assertFalse(heardOnExit, "heardOnExit == false");
+        Assertions.assertFalse(heardOnTransition, "heardOnTransition == false");
     }
 
     @Test
@@ -162,14 +162,14 @@ public class AbstractSCXMLListenerTest {
                 // empty
             };
 
-            Assert.assertFalse("heardOnEntry == false", heardOnEntry);
-            Assert.assertFalse("heardOnExit == false", heardOnExit);
-            Assert.assertFalse("heardOnTransition == false", heardOnTransition);
+            Assertions.assertFalse(heardOnEntry, "heardOnEntry == false");
+            Assertions.assertFalse(heardOnExit, "heardOnExit == false");
+            Assertions.assertFalse(heardOnTransition, "heardOnTransition == false");
         listener3.onEntry(to);
         listener3.onExit(to);
         listener3.onTransition(from, to, transition, null);
-        Assert.assertFalse("heardOnEntry == false", heardOnEntry);
-        Assert.assertFalse("heardOnExit == false", heardOnExit);
-        Assert.assertFalse("heardOnTransition == false", heardOnTransition);
+        Assertions.assertFalse(heardOnEntry, "heardOnEntry == false");
+        Assertions.assertFalse(heardOnExit, "heardOnExit == false");
+        Assertions.assertFalse(heardOnTransition, "heardOnTransition == false");
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/AbstractStateMachineTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/AbstractStateMachineTest.java b/src/test/java/org/apache/commons/scxml2/env/AbstractStateMachineTest.java
index 28f5c30..bcdf78d 100644
--- a/src/test/java/org/apache/commons/scxml2/env/AbstractStateMachineTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/AbstractStateMachineTest.java
@@ -19,8 +19,8 @@ package org.apache.commons.scxml2.env;
 import java.net.URL;
 
 import org.apache.commons.scxml2.model.ModelException;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests {@link org.apache.commons.scxml2.env.AbstractStateMachine}.
@@ -35,8 +35,8 @@ public class AbstractStateMachineTest {
         Foo f = new Foo(fooScxmlDocument);
         Bar b = new Bar(barScxmlDocument);
 
-        Assert.assertTrue(f.fooCalled());
-        Assert.assertTrue(b.barCalled());
+        Assertions.assertTrue(f.fooCalled());
+        Assertions.assertTrue(b.barCalled());
     }
 
     private class Foo extends AbstractStateMachine {

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/LogUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/LogUtilsTest.java b/src/test/java/org/apache/commons/scxml2/env/LogUtilsTest.java
index 9e33169..4e69071 100644
--- a/src/test/java/org/apache/commons/scxml2/env/LogUtilsTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/LogUtilsTest.java
@@ -18,8 +18,8 @@ package org.apache.commons.scxml2.env;
 
 import org.apache.commons.scxml2.model.State;
 import org.apache.commons.scxml2.model.Transition;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class LogUtilsTest {
 
@@ -28,7 +28,7 @@ public class LogUtilsTest {
         State target = new State();
         target.setId("ID");
         
-        Assert.assertEquals("/ID", LogUtils.getTTPath(target));
+        Assertions.assertEquals("/ID", LogUtils.getTTPath(target));
     }
     
     @Test
@@ -45,7 +45,7 @@ public class LogUtilsTest {
         parent1.setParent(parent2);
         target.setParent(parent1);
         
-        Assert.assertEquals("/parent2/parent1/ID", LogUtils.getTTPath(target));
+        Assertions.assertEquals("/parent2/parent1/ID", LogUtils.getTTPath(target));
     }
     
     @Test
@@ -60,7 +60,7 @@ public class LogUtilsTest {
         transition.setCond("condition");
         transition.setEvent("event happened");
         
-        Assert.assertEquals( "(event = event happened, cond = condition, from = /FROM, to = /TO)",
+        Assertions.assertEquals( "(event = event happened, cond = condition, from = /FROM, to = /TO)",
                                         LogUtils.transToString(targetFrom, targetTo, transition, transition.getEvent()));
     }
 

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java
index f3ab7b9..11e9f41 100644
--- a/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/SimpleContextTest.java
@@ -19,15 +19,15 @@ package org.apache.commons.scxml2.env;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 public class SimpleContextTest {
 
     private SimpleContext context;
 
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         context = new SimpleContext();
     }
@@ -39,7 +39,7 @@ public class SimpleContextTest {
         
         context.setVars(vars);
         
-        Assert.assertTrue(context.has("key"));
+        Assertions.assertTrue(context.has("key"));
     }
 
     @Test
@@ -49,7 +49,7 @@ public class SimpleContextTest {
         
         context.setVars(vars);
         
-        Assert.assertFalse(context.has("differentKey"));
+        Assertions.assertFalse(context.has("differentKey"));
     }
     
     @Test
@@ -65,7 +65,7 @@ public class SimpleContextTest {
         context.setVars(vars);
         context = new SimpleContext(parentContext, parentVars);
         
-        Assert.assertFalse(context.has("differentKey"));
+        Assertions.assertFalse(context.has("differentKey"));
     }
 
     @Test
@@ -81,14 +81,14 @@ public class SimpleContextTest {
         context.setVars(vars);
         context = new SimpleContext(parentContext, parentVars);
         
-        Assert.assertTrue(context.has("differentKey"));
+        Assertions.assertTrue(context.has("differentKey"));
     }
     
     @Test
     public void testGetNull() {
         Object value = context.get("key");
         
-        Assert.assertNull(value);
+        Assertions.assertNull(value);
     }
     
     @Test
@@ -98,7 +98,7 @@ public class SimpleContextTest {
         
         context.setVars(vars);
         
-        Assert.assertEquals("value", context.get("key"));
+        Assertions.assertEquals("value", context.get("key"));
     }
     
     @Test
@@ -114,7 +114,7 @@ public class SimpleContextTest {
         context.setVars(vars);
         context = new SimpleContext(parentContext, parentVars);
         
-        Assert.assertEquals("differentValue", context.get("differentKey"));
+        Assertions.assertEquals("differentValue", context.get("differentKey"));
     }
     
     @Test
@@ -124,7 +124,7 @@ public class SimpleContextTest {
         
         context.setVars(vars);
         
-        Assert.assertNull(context.get("differentKey"));
+        Assertions.assertNull(context.get("differentKey"));
     }
     
     @Test
@@ -140,7 +140,7 @@ public class SimpleContextTest {
         context.setVars(vars);
         context = new SimpleContext(parentContext, parentVars);
         
-        Assert.assertNull(context.get("reallyDifferentKey"));
+        Assertions.assertNull(context.get("reallyDifferentKey"));
     }
 
     @Test
@@ -152,7 +152,7 @@ public class SimpleContextTest {
         
         context.set("key", "newValue");
         
-        Assert.assertEquals("newValue", context.get("key"));
+        Assertions.assertEquals("newValue", context.get("key"));
     }
 
     @Test
@@ -162,7 +162,7 @@ public class SimpleContextTest {
         
         context.set("key", "newValue");
         
-        Assert.assertEquals("newValue", context.get("key"));
+        Assertions.assertEquals("newValue", context.get("key"));
     }
     
     @Test
@@ -180,7 +180,7 @@ public class SimpleContextTest {
         
         context.set("differentKey", "newValue");
         
-        Assert.assertEquals("newValue", context.get("differentKey"));
+        Assertions.assertEquals("newValue", context.get("differentKey"));
     }
 
     @Test
@@ -191,7 +191,7 @@ public class SimpleContextTest {
         SimpleContext parentContext = new SimpleContext(rootEffectiveContext);
         try {
             new EffectiveContextMap(parentContext);
-            Assert.fail("Nested EffectiveContextMap wrapping should fail");
+            Assertions.fail("Nested EffectiveContextMap wrapping should fail");
         }
         catch (IllegalArgumentException e) {
             // good
@@ -205,11 +205,11 @@ public class SimpleContextTest {
         SimpleContext parentContext = new SimpleContext(rootContext);
         parentContext.setLocal("key", "parent");
         SimpleContext effectiveContext = new SimpleContext(parentContext, new EffectiveContextMap(parentContext));
-        Assert.assertEquals("parent", effectiveContext.get("key"));
+        Assertions.assertEquals("parent", effectiveContext.get("key"));
         // ensure EffectiveContextMap provides complete local variable shadowing
         for (Map.Entry<String,Object> entry : effectiveContext.getVars().entrySet()) {
             if (entry.getKey().equals("key")) {
-                Assert.assertEquals("parent", entry.getValue());
+                Assertions.assertEquals("parent", entry.getValue());
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/StopWatchTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/StopWatchTest.java b/src/test/java/org/apache/commons/scxml2/env/StopWatchTest.java
index db3f95b..241743d 100644
--- a/src/test/java/org/apache/commons/scxml2/env/StopWatchTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/StopWatchTest.java
@@ -16,10 +16,10 @@
  */
 package org.apache.commons.scxml2.env;
 
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 public class StopWatchTest {
 
@@ -28,7 +28,7 @@ public class StopWatchTest {
     /**
      * Set up instance variables required by this test case.
      */
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         stopWatch = new StopWatch();
     }
@@ -36,24 +36,24 @@ public class StopWatchTest {
     /**
      * Tear down instance variables required by this test case.
      */
-    @After
+    @AfterEach
     public void tearDown() {
         stopWatch = null;
     }
 
     @Test
     public void testStopWatch() {
-        Assert.assertEquals("reset", stopWatch.getCurrentState());
+        Assertions.assertEquals("reset", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_START);
-        Assert.assertEquals("running", stopWatch.getCurrentState());
+        Assertions.assertEquals("running", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_SPLIT);
-        Assert.assertEquals("paused", stopWatch.getCurrentState());
+        Assertions.assertEquals("paused", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_UNSPLIT);
-        Assert.assertEquals("running", stopWatch.getCurrentState());
+        Assertions.assertEquals("running", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_STOP);
-        Assert.assertEquals("stopped", stopWatch.getCurrentState());
+        Assertions.assertEquals("stopped", stopWatch.getCurrentState());
         stopWatch.fireEvent(StopWatch.EVENT_RESET);
-        Assert.assertEquals("reset", stopWatch.getCurrentState());
+        Assertions.assertEquals("reset", stopWatch.getCurrentState());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyClosureTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyClosureTest.java b/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyClosureTest.java
index aa0e8fc..082e1cb 100644
--- a/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyClosureTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyClosureTest.java
@@ -23,8 +23,8 @@ import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.model.EnterableState;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class GroovyClosureTest {
 
@@ -34,8 +34,8 @@ public class GroovyClosureTest {
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor(groovyClosure, new GroovyEvaluator(true));
         exec.go();
         Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "turn_on");
-        Assert.assertEquals(2, currentStates.size());
+        Assertions.assertEquals(2, currentStates.size());
         String id = currentStates.iterator().next().getId();
-        Assert.assertTrue(id.equals("closed") || id.equals("cooking"));
+        Assertions.assertTrue(id.equals("closed") || id.equals("cooking"));
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyContextTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyContextTest.java b/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyContextTest.java
index 3d916f4..6438ba4 100644
--- a/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyContextTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyContextTest.java
@@ -19,15 +19,15 @@ package org.apache.commons.scxml2.env.groovy;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class GroovyContextTest {
 
     @Test
     public void testNew() {
         GroovyContext ctx = new GroovyContext();
-        Assert.assertNotNull(ctx);
+        Assertions.assertNotNull(ctx);
     }
     
     @Test
@@ -35,20 +35,20 @@ public class GroovyContextTest {
         Map<String, Object> m = new HashMap<>();
         m.put("foo", "bar");
         GroovyContext ctx = new GroovyContext(null, m, null);
-        Assert.assertNotNull(ctx);
-        Assert.assertEquals(1, ctx.getVars().size());
+        Assertions.assertNotNull(ctx);
+        Assertions.assertEquals(1, ctx.getVars().size());
         String fooValue = (String) ctx.get("foo");
-        Assert.assertEquals("bar", fooValue);
+        Assertions.assertEquals("bar", fooValue);
     }
     
     @Test
     public void testSetVars() {
         GroovyContext ctx = new GroovyContext();
-        Assert.assertNotNull(ctx);
+        Assertions.assertNotNull(ctx);
         ctx.set("foo", "bar");
-        Assert.assertEquals(1, ctx.getVars().size());
+        Assertions.assertEquals(1, ctx.getVars().size());
         String fooValue = (String) ctx.get("foo");
-        Assert.assertEquals("bar", fooValue);
+        Assertions.assertEquals("bar", fooValue);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java b/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java
index 386ec64..682e83a 100644
--- a/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java
@@ -23,16 +23,16 @@ import org.apache.commons.scxml2.SCXMLSystemContext;
 import org.apache.commons.scxml2.StateConfiguration;
 import org.apache.commons.scxml2.Status;
 import org.apache.commons.scxml2.model.State;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 public class GroovyEvaluatorTest {
 
     private static final String BAD_EXPRESSION = ">";
     private Context ctx;
 
-    @Before
+    @BeforeEach
     public void before() {
         ctx = new GroovyContext(new SCXMLSystemContext(new GroovyContext()), null);
     }
@@ -40,13 +40,13 @@ public class GroovyEvaluatorTest {
     @Test
     public void testEval() throws SCXMLExpressionException {
         Evaluator eval = new GroovyEvaluator();
-        Assert.assertEquals(2, eval.eval(ctx, "1 + 1"));
+        Assertions.assertEquals(2, eval.eval(ctx, "1 + 1"));
     }
 
     @Test
     public void testPristine() throws SCXMLExpressionException {
         Evaluator eval = new GroovyEvaluator();
-        Assert.assertTrue(eval.evalCond(ctx, "1 + 1 == 2"));
+        Assertions.assertTrue(eval.evalCond(ctx, "1 + 1 == 2"));
     }
 
     @Test
@@ -59,7 +59,7 @@ public class GroovyEvaluatorTest {
         State state1 = new State();
         state1.setId("state1");
         stateConfiguration.enterState(state1);
-        Assert.assertTrue(eval.evalCond(ctx, "In('state1')"));
+        Assertions.assertTrue(eval.evalCond(ctx, "In('state1')"));
     }
 
     @Test
@@ -73,29 +73,29 @@ public class GroovyEvaluatorTest {
             "} else {\n" +
                 "y = 2;\n" +
             "}";
-        Assert.assertEquals(2, eval.evalScript(ctx, script));
-        Assert.assertEquals(2, ctx.get("y"));
+        Assertions.assertEquals(2, eval.evalScript(ctx, script));
+        Assertions.assertEquals(2, ctx.get("y"));
     }
 
     @Test
     public void testErrorMessage() {
         Evaluator eval = new GroovyEvaluator();
-        Assert.assertNotNull(eval);
+        Assertions.assertNotNull(eval);
         try {
             eval.eval(ctx, BAD_EXPRESSION);
-            Assert.fail("GroovyEvaluator should throw SCXMLExpressionException");
+            Assertions.fail("GroovyEvaluator should throw SCXMLExpressionException");
         } catch (SCXMLExpressionException e) {
-            Assert.assertTrue("GroovyEvaluator: Incorrect error message",
-                e.getMessage().startsWith("eval('" + BAD_EXPRESSION + "'):"));
+            Assertions.assertTrue(e.getMessage().startsWith("eval('" + BAD_EXPRESSION + "'):"),
+                    "GroovyEvaluator: Incorrect error message");
         }
     }
 
     @Test
     public void testPreprocessScript() {
         GroovyEvaluator evaluator = new GroovyEvaluator();
-        Assert.assertEquals("x &&  x || x  !  x == x <  x <= x != x >  x >= x", evaluator.getScriptPreProcessor().
+        Assertions.assertEquals("x &&  x || x  !  x == x <  x <= x != x >  x >= x", evaluator.getScriptPreProcessor().
                 preProcess("x and x or x not x eq x lt x le x ne x gt x ge x"));
-        Assert.assertEquals("and x OR x\n ! \nx\n== x < \nx(le)x ne. xgt x ge", evaluator.getScriptPreProcessor().
+        Assertions.assertEquals("and x OR x\n ! \nx\n== x < \nx(le)x ne. xgt x ge", evaluator.getScriptPreProcessor().
                  preProcess("and x OR x\nnot\nx\neq x lt\nx(le)x ne. xgt x ge"));
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.java b/src/test/java/org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.java
index 602a890..1b7b6c9 100644
--- a/src/test/java/org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.java
@@ -22,8 +22,8 @@ import java.util.Set;
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.model.EnterableState;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit tests {@link org.apache.commons.scxml2.SCXMLExecutor}.
@@ -40,11 +40,11 @@ public class SerializableInitialBaseScriptTest {
     	SCXMLExecutor exec = SCXMLTestHelper.getExecutor(scxml, new GroovyEvaluator(true));
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state1", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state1", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testInstanceSerializability(exec);
         currentStates = SCXMLTestHelper.fireEvent(exec, "foo.bar.baz");
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("state4", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("state4", currentStates.iterator().next().getId());
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/groovy/StaticMethodTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/groovy/StaticMethodTest.java b/src/test/java/org/apache/commons/scxml2/env/groovy/StaticMethodTest.java
index 7dc50f9..323fc73 100644
--- a/src/test/java/org/apache/commons/scxml2/env/groovy/StaticMethodTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/groovy/StaticMethodTest.java
@@ -21,8 +21,8 @@ import java.util.Set;
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.model.EnterableState;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 public class StaticMethodTest {
 
@@ -32,7 +32,7 @@ public class StaticMethodTest {
         exec.getRootContext().set("System", System.class);
         exec.go();
         Set<EnterableState> currentStates = exec.getStatus().getStates();
-        Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("static", currentStates.iterator().next().getId());
+        Assertions.assertEquals(1, currentStates.size());
+        Assertions.assertEquals("static", currentStates.iterator().next().getId());
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-scxml/blob/d1900d37/src/test/java/org/apache/commons/scxml2/env/javascript/JSContextTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/scxml2/env/javascript/JSContextTest.java b/src/test/java/org/apache/commons/scxml2/env/javascript/JSContextTest.java
index b1c1ddd..59f53a7 100644
--- a/src/test/java/org/apache/commons/scxml2/env/javascript/JSContextTest.java
+++ b/src/test/java/org/apache/commons/scxml2/env/javascript/JSContextTest.java
@@ -18,8 +18,8 @@
 package org.apache.commons.scxml2.env.javascript;
 
 import org.apache.commons.scxml2.env.SimpleContext;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test case for the JSContext SCXML Context implementation for
@@ -33,7 +33,7 @@ public class JSContextTest {
          */
         @Test
         public void testDefaultConstructor() {
-            Assert.assertNotNull("Error in JSContext default constructor",new JSContext());
+            Assertions.assertNotNull(new JSContext(), "Error in JSContext default constructor");
         }
 
         /**
@@ -42,7 +42,7 @@ public class JSContextTest {
          */
         @Test
         public void testChildConstructor() {
-                Assert.assertNotNull("Error in JSContext child constructor",new JSContext(new SimpleContext()));
+                Assertions.assertNotNull(new JSContext(new SimpleContext()), "Error in JSContext child constructor");
         }
 }
 


Mime
View raw message