diff --git a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/AbstractParserTest.java b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/AbstractParserTest.java
index 5d74295..1d8c4d7 100644
--- a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/AbstractParserTest.java
+++ b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/AbstractParserTest.java
@@ -24,19 +24,19 @@
 import java.io.OutputStream;
 import java.io.PrintStream;
 
-import junit.framework.TestCase;
 import org.apache.felix.gogo.runtime.threadio.ThreadIOImpl;
+import org.junit.After;
+import org.junit.Before;
 
-public abstract class AbstractParserTest extends TestCase {
+public abstract class AbstractParserTest {
 
     private ThreadIOImpl threadIO;
     private InputStream sin;
     private PrintStream sout;
     private PrintStream serr;
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {
         sin = new NoCloseInputStream(System.in);
         sout = new NoClosePrintStream(System.out);
         serr = new NoClosePrintStream(System.err);
@@ -44,10 +44,9 @@
         threadIO.start();
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         threadIO.stop();
-        super.tearDown();
     }
 
     public class Context extends org.apache.felix.gogo.runtime.Context {
diff --git a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestCoercion.java b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestCoercion.java
index f4ea27c..475596e 100644
--- a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestCoercion.java
+++ b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestCoercion.java
@@ -21,6 +21,11 @@
 import org.apache.felix.service.command.CommandSession;
 import org.apache.felix.service.command.Descriptor;
 import org.apache.felix.service.command.Parameter;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
 
 public class TestCoercion extends AbstractParserTest
 {
@@ -55,6 +60,7 @@
         return s;
     }
 
+    @Test
     public void testSimpleTypes() throws Exception
     {
         Context c = new Context();
@@ -118,6 +124,7 @@
         return "string";
     }
 
+    @Test
     public void testBestCoercion() throws Exception
     {
         Context c = new Context();
@@ -145,6 +152,7 @@
         return flag;
     }
 
+    @Test
     public void testParameter0() throws Exception
     {
         Context c = new Context();
@@ -173,6 +181,7 @@
         return parm1;
     }
 
+    @Test
     public void testParameter1() throws Exception
     {
         Context c = new Context();
diff --git a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser.java b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser.java
index 239fba4..34e6400 100644
--- a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser.java
+++ b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser.java
@@ -33,11 +33,17 @@
 import org.apache.felix.gogo.runtime.Parser.Statement;
 import org.apache.felix.service.command.CommandSession;
 import org.apache.felix.service.command.Function;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
 
 public class TestParser extends AbstractParserTest
 {
     int beentheredonethat = 0;
 
+    @Test
     public void testEvaluatation() throws Exception
     {
         Context c = new Context();
@@ -49,6 +55,7 @@
         assertEquals("a", c.execute("((echo a)) | capture"));
     }
 
+    @Test
     public void testUnknownCommand() throws Exception
     {
         Context c = new Context();
@@ -63,6 +70,7 @@
         }
     }
 
+    @Test
     public void testSpecialValues() throws Exception
     {
         Context c = new Context();
@@ -71,6 +79,7 @@
         assertEquals(null, c.execute("null"));
     }
 
+    @Test
     public void testQuotes() throws Exception
     {
         Context c = new Context();
@@ -97,6 +106,7 @@
         assertEquals("a  b ", c.execute("echo \"$d\""));
     }
 
+    @Test
     public void testScope() throws Exception
     {
         Context c = new Context();
@@ -105,6 +115,7 @@
         assertEquals("file://poo", c.execute("test:echo file://poo"));
     }
 
+    @Test
     public void testPipe() throws Exception
     {
         Context c = new Context();
@@ -126,6 +137,7 @@
         assertEquals("defghi", c.execute("(echoout abc; echoout def; echoout ghi)|grep 'def|ghi'|capture"));
     }
 
+    @Test
     public void testAssignment() throws Exception
     {
         Context c = new Context();
@@ -141,6 +153,7 @@
         assertEquals("a", c.execute("a = a; echo ${$a}"));
     }
 
+    @Test
     public void testComment() throws Exception
     {
         Context c = new Context();
@@ -148,6 +161,7 @@
         assertEquals("1", c.execute("echo 1 // hello"));
     }
 
+    @Test
     public void testClosure() throws Exception
     {
         Context c = new Context();
@@ -162,6 +176,7 @@
         assertEquals("ca  b", c.execute("e = { echo c$args } ; e 'a  b'"));
     }
 
+    @Test
     public void testArray() throws Exception
     {
         Context c = new Context();
@@ -174,6 +189,7 @@
         assertEquals(5, c.execute("[1 2 [3 4] 5 6] size"));
     }
 
+    @Test
     public void testParentheses()
     {
         Parser parser = new Parser("(a|b)|(d|f)");
@@ -185,6 +201,7 @@
         assertEquals("d.*", ((Sequence)((Statement) ((Pipeline) p.tokens().get(0)).tokens().get(0)).tokens().get(1)).program().toString());
     }
 
+    @Test
     public void testEcho() throws Exception
     {
         Context c = new Context();
@@ -220,6 +237,7 @@
         return sw.toString();
     }
 
+    @Test
     public void testVars() throws Exception
     {
         Context c = new Context();
@@ -230,6 +248,7 @@
         assertEquals("a", c.execute("a = a; echo ${a}"));
     }
 
+    @Test
     public void testFunny() throws Exception
     {
         Context c = new Context();
@@ -265,6 +284,7 @@
         System.out.println(echo(args));
     }
 
+    @Test
     public void testContext() throws Exception
     {
         Context c = new Context();
@@ -311,6 +331,7 @@
         System.out.println("]");
     }
 
+    @Test
     public void testProgram()
     {
         Program x = new Parser("abc def|ghi jkl;mno pqr|stu vwx").program();
@@ -333,6 +354,7 @@
         assertEquals("vwx", s11.tokens().get(1).toString());
     }
 
+    @Test
     public void testStatements()
     {
         Program x = new Parser("abc def|ghi jkl|mno pqr").program();
@@ -348,6 +370,7 @@
         assertEquals("pqr", s02.tokens().get(1).toString());
     }
 
+    @Test
     public void testPipeRedir()
     {
         Program x = new Parser("abc def|&ghi").program();
@@ -360,6 +383,7 @@
         assertEquals("ghi", s01.tokens().get(0).toString());
     }
 
+    @Test
     public void testPipeAndOr()
     {
         Program x = new Parser("abc|def&&ghi || jkl").program();
@@ -377,6 +401,7 @@
         assertEquals("jkl", s2.tokens().get(0).toString());
     }
 
+    @Test
     public void testBackground() {
         Program x = new Parser("echo foo&echo bar").program();
         Statement s0 = (Statement) x.tokens().get(0);
@@ -388,6 +413,7 @@
         assertEquals("bar", s1.tokens().get(1).toString());
     }
 
+    @Test
     public void testRedir() {
         Program x = new Parser("echo foo&>bar").program();
         Statement s0 = (Statement) x.tokens().get(0);
@@ -411,6 +437,7 @@
         assertEquals("bar", s0.redirections().get(1).toString());
     }
 
+    @Test
     public void testSimpleValue()
     {
         Program p = new Parser(
diff --git a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser2.java b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser2.java
index 09b8928..207dcd8 100644
--- a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser2.java
+++ b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser2.java
@@ -20,12 +20,19 @@
 
 import java.io.EOFException;
 
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 /*
  * Test features of the new parser/tokenizer, many of which are not supported
  * by the original parser.
  */
 public class TestParser2 extends AbstractParserTest
 {
+    @Test
     public void testComment() throws Exception
     {
         Context c = new Context();
@@ -55,6 +62,7 @@
 //CHANGE        assertEquals("ok", c.execute("x = {// can't quote\necho ok\n}; x"));
     }
 
+    @Test
     public void testCoercion() throws Exception
     {
         Context c = new Context();
@@ -63,6 +71,7 @@
         assertEquals("null x", c.execute("echo $expandsToNull x"));
     }
 
+    @Test
     public void testStringExecution() throws Exception
     {
         Context c = new Context();
diff --git a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser3.java b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser3.java
index 4021fdb..2fb4609 100644
--- a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser3.java
+++ b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser3.java
@@ -18,12 +18,17 @@
  */
 package org.apache.felix.gogo.runtime;
 
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
 /*
  * Test features of the new parser/tokenizer, many of which are not supported
  * by the original parser.
  */
 public class TestParser3 extends AbstractParserTest
 {
+    @Test
     public void testArithmetic() throws Exception
     {
         Context c = new Context();
diff --git a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser4.java b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser4.java
index 6a5821d..3931452 100644
--- a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser4.java
+++ b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/TestParser4.java
@@ -27,6 +27,10 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
 /*
  * Test features of the new parser/tokenizer, many of which are not supported
  * by the original parser.
@@ -44,6 +48,7 @@
         assertEquals("hello\n", c.execute("echoerr hello|& tac"));
     }
 
+    @Test
     public void testRedir() throws Exception {
         Context c = new Context();
         c.addCommand("echo", this);
@@ -58,6 +63,7 @@
         assertEquals("hello\n", new String(Files.readAllBytes(path.resolve("foo"))));
     }
 
+    @Test
     public void testRedirInput() throws Exception {
         Context c = new Context();
         c.addCommand("echo", this);
@@ -75,6 +81,7 @@
         assertEquals("a\nb\n", c.execute("cat <fooa <foob | tac"));
     }
 
+    @Test
     public void testMultiInput() throws Exception {
         Context c = new Context();
         c.addCommand("echo", this);
diff --git a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/expr/ExpressionTest.java b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/expr/ExpressionTest.java
index c99a5ba..b5d907a 100644
--- a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/expr/ExpressionTest.java
+++ b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/expr/ExpressionTest.java
@@ -21,11 +21,13 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
 import org.apache.felix.gogo.runtime.Expression;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class ExpressionTest extends TestCase {
+public class ExpressionTest {
 
+    @Test
     public void testExpr() {
 
         Map<String, Object> variables = new HashMap<String, Object>();
@@ -36,23 +38,23 @@
         variables.put("s", " foo ");
         variables.put("t", "bar");
 
-        assertEquals(4l, new Expression("c+=1, d+=2").eval(variables));
+        Assert.assertEquals(4l, new Expression("c+=1, d+=2").eval(variables));
 
-        assertEquals(" foo ", new Expression("\" foo \"").eval());
-        assertEquals(" foo bar", new Expression("s + t").eval(variables));
-        assertEquals(1l, new Expression("s < t").eval(variables));
-        assertEquals(1l, new Expression("s > t || t == \"bar\"").eval(variables));
+        Assert.assertEquals(" foo ", new Expression("\" foo \"").eval());
+        Assert.assertEquals(" foo bar", new Expression("s + t").eval(variables));
+        Assert.assertEquals(1l, new Expression("s < t").eval(variables));
+        Assert.assertEquals(1l, new Expression("s > t || t == \"bar\"").eval(variables));
 
-        assertEquals(3l, new Expression("a += 1").eval(variables));
-        assertEquals(3l, variables.get("a"));
+        Assert.assertEquals(3l, new Expression("a += 1").eval(variables));
+        Assert.assertEquals(3l, variables.get("a"));
 
-        assertEquals(30l, new Expression("10 + 20 | 30").eval());
+        Assert.assertEquals(30l, new Expression("10 + 20 | 30").eval());
 
-        assertEquals(8l, new Expression("a + b").eval(variables));
-        assertEquals(3l, new Expression("if(a < b, a, b)").eval(variables));
+        Assert.assertEquals(8l, new Expression("a + b").eval(variables));
+        Assert.assertEquals(3l, new Expression("if(a < b, a, b)").eval(variables));
 
-        assertEquals(16l, new Expression("2 + 2 << 2").eval());
-        assertEquals(8l, new Expression("2 | 2 << 2").eval());
+        Assert.assertEquals(16l, new Expression("2 + 2 << 2").eval());
+        Assert.assertEquals(8l, new Expression("2 | 2 << 2").eval());
     }
 
 }
diff --git a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/threadio/TestThreadIO.java b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/threadio/TestThreadIO.java
index f7afab7..babe72c 100644
--- a/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/threadio/TestThreadIO.java
+++ b/gogo/runtime/src/test/java/org/apache/felix/gogo/runtime/threadio/TestThreadIO.java
@@ -23,10 +23,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class TestThreadIO extends TestCase
-{
+public class TestThreadIO {
 
     /**
      * Test if the threadio works in a nested fashion. We first push
@@ -34,6 +34,7 @@
      * the output in a ByteArrayOutputStream. Then we pop them, also printing
      * a message identifying the level. Then we verify the output for each level.
      */
+    @Test
     public void testNested()
     {
         ThreadIOImpl tio = new ThreadIOImpl();
@@ -55,13 +56,14 @@
         for (int i = 0; i < 10; i++)
         {
             String message = list.get(i).toString().trim();
-            assertEquals("b" + i + "e" + i, message);
+            Assert.assertEquals("b" + i + "e" + i, message);
         }
     }
 
     /**
      * Simple test too see if the basics work.
      */
+    @Test
     public void testSimple()
     {
         ThreadIOImpl tio = new ThreadIOImpl();
@@ -82,7 +84,7 @@
         tio.stop();
         String normal = out.toString().trim();
         //String error = err.toString().trim();
-        assertEquals("Simple Normal Message", normal);
+        Assert.assertEquals("Simple Normal Message", normal);
         //assertEquals("Simple Error Message", error );
         System.out.println("Goodbye World");
     }
