Index: test/java/org/apache/fop/image/loader/batik/ImageLoaderTestCase.java
===================================================================
--- test/java/org/apache/fop/image/loader/batik/ImageLoaderTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/image/loader/batik/ImageLoaderTestCase.java	(working copy)
@@ -19,12 +19,14 @@
 
 package org.apache.fop.image.loader.batik;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
 import java.awt.image.Raster;
 import java.awt.image.RenderedImage;
 import java.io.File;
 
-import junit.framework.TestCase;
-
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.FopFactory;
 import org.apache.xmlgraphics.image.loader.Image;
@@ -35,23 +37,24 @@
 import org.apache.xmlgraphics.image.loader.impl.ImageRendered;
 import org.apache.xmlgraphics.image.loader.impl.ImageXMLDOM;
 import org.apache.xmlgraphics.image.writer.ImageWriterUtil;
+import org.junit.Test;
 
 /**
  * Tests for bundled ImageLoader implementations.
  */
-public class ImageLoaderTestCase extends TestCase {
+public class ImageLoaderTestCase {
 
     private static final File DEBUG_TARGET_DIR = null; //new File("D:/");
 
     private FopFactory fopFactory;
 
-    public ImageLoaderTestCase(String name) {
-        super(name);
+    public ImageLoaderTestCase() {
         fopFactory = FopFactory.newInstance();
         fopFactory.setSourceResolution(72);
         fopFactory.setTargetResolution(300);
     }
 
+    @Test
     public void testSVG() throws Exception {
         String uri = "test/resources/images/img-w-size.svg";
 
@@ -90,6 +93,7 @@
         assertEquals(16000, info.getSize().getHeightMpt());
     }
 
+    @Test
     public void testSVGNoViewbox() throws Exception {
         String uri = "test/resources/images/circles.svg";
 
@@ -135,6 +139,7 @@
         assertEquals(340158, info.getSize().getHeightMpt());
     }
 
+    @Test
     public void testWMF() throws Exception {
         String uri = "test/resources/images/testChart.wmf";
 
@@ -162,6 +167,7 @@
         assertEquals(612000, info.getSize().getHeightMpt());
     }
 
+    @Test
     public void testSVGWithReferences() throws Exception {
         String uri = "test/resources/fop/svg/images.svg";
         FopFactory ff = FopFactory.newInstance();
@@ -213,7 +219,4 @@
         }
         assertFalse("Embedding JPG into SVG failed", same);
     }
-
-
-    
 }
Index: test/java/org/apache/fop/image/loader/batik/ImagePreloaderTestCase.java
===================================================================
--- test/java/org/apache/fop/image/loader/batik/ImagePreloaderTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/image/loader/batik/ImagePreloaderTestCase.java	(working copy)
@@ -19,6 +19,9 @@
 
 package org.apache.fop.image.loader.batik;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
 import java.io.IOException;
 
 import javax.xml.transform.Source;
@@ -26,42 +29,39 @@
 import javax.xml.transform.URIResolver;
 import javax.xml.transform.dom.DOMSource;
 
-import junit.framework.TestCase;
-
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
 import org.apache.batik.dom.svg.SVGDOMImplementation;
-
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.FopFactory;
+import org.apache.fop.apps.MimeConstants;
 import org.apache.xmlgraphics.image.loader.ImageException;
 import org.apache.xmlgraphics.image.loader.ImageInfo;
 import org.apache.xmlgraphics.image.loader.ImageManager;
+import org.junit.Test;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.FopFactory;
-import org.apache.fop.apps.MimeConstants;
-
 /**
  * Tests for bundled image preloader implementations.
  */
-public class ImagePreloaderTestCase extends TestCase {
+public class ImagePreloaderTestCase {
 
     private FopFactory fopFactory;
 
-    public ImagePreloaderTestCase(String name) {
-        super(name);
+    public ImagePreloaderTestCase() {
         fopFactory = FopFactory.newInstance();
         fopFactory.setSourceResolution(72);
         fopFactory.setTargetResolution(300);
     }
 
+    @Test
     public void testSVG() throws Exception {
         String uri = "test/resources/images/img-w-size.svg";
 
         checkSVGFile(uri);
     }
 
+    @Test
     public void testSVGZ() throws Exception {
         String uri = "test/resources/images/img-w-size.svgz";
 
@@ -83,6 +83,7 @@
         assertEquals(16000, info.getSize().getHeightMpt());
     }
 
+    @Test
     public void testSVGNoSize() throws Exception {
         String uri = "test/resources/images/img.svg";
         FOUserAgent userAgent = fopFactory.newFOUserAgent();
@@ -99,6 +100,7 @@
         assertEquals(100000, info.getSize().getHeightMpt());
     }
 
+    @Test
     public void testSVGWithDOM() throws Exception {
         String uri = "my:SVGImage";
         FOUserAgent userAgent = fopFactory.newFOUserAgent();
@@ -143,6 +145,7 @@
         assertEquals(20000, info.getSize().getHeightMpt());
     }
 
+    @Test
     public void testWMF() throws Exception {
         String uri = "test/resources/images/testChart.wmf";
 
Index: test/java/org/apache/fop/AbstractFOPTestCase.java
===================================================================
--- test/java/org/apache/fop/AbstractFOPTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/AbstractFOPTestCase.java	(working copy)
@@ -21,25 +21,16 @@
 
 import java.io.File;
 
-import junit.framework.TestCase;
-
 /**
  * Abstract base test class for FOP's tests.
  */
-public abstract class AbstractFOPTestCase extends TestCase {
+public abstract class AbstractFOPTestCase {
 
     /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public AbstractFOPTestCase(String name) {
-        super(name);
-    }
-
-    /**
      * Returns the base directory to use for the tests.
      * @return the base directory
      */
-    protected File getBaseDir() {
+    protected static File getBaseDir() {
         String basedir = System.getProperty("basedir");
         if (basedir != null) {
             return new File(basedir);
Index: test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java
===================================================================
--- test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java	(revision 1177642)
+++ test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java	(working copy)
@@ -19,14 +19,15 @@
 
 package org.apache.fop.text.linebreak;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import static org.junit.Assert.assertTrue;
 
+import org.junit.Test;
+
+
 /**
  * JUnit test case for the LineBreakStatus class
  */
-public class LineBreakStatusTest extends TestCase {
+public class LineBreakStatusTest {
 
     /*
      * These symbols are used to indicate the break action returned
@@ -37,27 +38,9 @@
     private static final String BREAK_ACTION = "_%#@^!";
 
     /**
-     * Creates the test with the given name.
-     * @param testName The name for this test.
-     */
-    public LineBreakStatusTest(String testName) {
-        super(testName);
-    }
-
-    /**
-     * Returns an TestSuite constructed from this class.
-     * @return the TestSuite
-     * @see junit.framework.TestSuite#TestSuite(class)
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(LineBreakStatusTest.class);
-
-        return suite;
-    }
-
-    /**
      * Test of reset method, of class org.apache.commons.text.linebreak.LineBreakStatus.
      */
+    @Test
     public void testReset() {
         System.out.println("testReset");
         // TODO
@@ -67,6 +50,7 @@
      * Test of nextChar method, of class org.apache.commons.text.linebreak.LineBreakStatus.
      * Runs tests for most of the Line Breaking Properties defined in the Unicode standard.
      */
+    @Test
     public void testNextChar() {
         System.out.println("testNextChar");
 
Index: test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java
===================================================================
--- test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java	(revision 1177642)
+++ test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java	(working copy)
@@ -19,22 +19,18 @@
 
 package org.apache.fop.text.linebreak;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
 
+import org.junit.Test;
+
 /**
  * TODO add javadoc
  *
  *
  */
-public class LineBreakUtilsTest extends TestCase {
+public class LineBreakUtilsTest {
 
-    /**
-     * @param name
-     */
-    public LineBreakUtilsTest(String name) {
-        super(name);
-    }
-
+    @Test
     public void testLineBreakProperty() {
         assertEquals(LineBreakUtils.getLineBreakProperty('A'), LineBreakUtils.LINE_BREAK_PROPERTY_AL);
         assertEquals(LineBreakUtils.getLineBreakProperty('1'), LineBreakUtils.LINE_BREAK_PROPERTY_NU);
@@ -44,6 +40,7 @@
         assertEquals(LineBreakUtils.getLineBreakProperty('\u1F7E'), 0);
     }
 
+    @Test
     public void testLineBreakPair() {
         assertEquals(
             LineBreakUtils.getLineBreakPairProperty(
Index: test/java/org/apache/fop/fotreetest/FOTreeTester.java
===================================================================
--- test/java/org/apache/fop/fotreetest/FOTreeTester.java	(revision 1177642)
+++ test/java/org/apache/fop/fotreetest/FOTreeTester.java	(working copy)
@@ -20,88 +20,144 @@
 package org.apache.fop.fotreetest;
 
 import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLFilterImpl;
-
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.AndFileFilter;
+import org.apache.commons.io.filefilter.IOFileFilter;
+import org.apache.commons.io.filefilter.NameFileFilter;
+import org.apache.commons.io.filefilter.PrefixFileFilter;
+import org.apache.commons.io.filefilter.SuffixFileFilter;
+import org.apache.commons.io.filefilter.TrueFileFilter;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.FopFactoryConfigurator;
 import org.apache.fop.fotreetest.ext.TestElementMapping;
+import org.apache.fop.layoutengine.LayoutEngineTestUtils;
 import org.apache.fop.util.ConsoleEventListenerForTests;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLFilterImpl;
 
 /**
  * Test driver class for FO tree tests.
  */
+@RunWith(Parameterized.class)
 public class FOTreeTester {
 
+    @Parameters
+    public static Collection<File[]> testXMLTestCases() throws Exception {
+        File mainDir = new File("test/fotree");
+
+        IOFileFilter filter;
+        String single = System.getProperty("fop.fotree.single");
+        String startsWith = System.getProperty("fop.fotree.starts-with");
+        if (single != null) {
+            filter = new NameFileFilter(single);
+        } else if (startsWith != null) {
+            filter = new PrefixFileFilter(startsWith);
+            filter = new AndFileFilter(filter, new SuffixFileFilter(".fo"));
+        } else {
+            filter = new SuffixFileFilter(".fo");
+            filter = LayoutEngineTestUtils.decorateWithDisabledList(filter);
+        }
+        Collection<File> files = FileUtils.listFiles(new File(mainDir, "testcases"), filter,
+                TrueFileFilter.INSTANCE);
+        String privateTests = System.getProperty("fop.fotree.private");
+        if ("true".equalsIgnoreCase(privateTests)) {
+            Collection privateFiles = FileUtils.listFiles(new File(mainDir, "private-testcases"),
+                    filter, TrueFileFilter.INSTANCE);
+            files.addAll(privateFiles);
+        }
+        // Unfortunately JUnit forces us to return a collection of arrays.
+        Collection<File[]> parameters = new ArrayList<File[]>();
+        for (File f : files) {
+            parameters.add(new File[] { f });
+        }
+        return parameters;
+    }
+
     private FopFactory fopFactory = FopFactory.newInstance();
 
+    private final File testFile;
+
     /**
      * Main constructor
+     *
+     * @param testFile the FO file to test
      */
-    public FOTreeTester() {
+    public FOTreeTester(File testFile) {
         fopFactory.addElementMapping(new TestElementMapping());
+        this.testFile = testFile;
     }
 
     /**
      * Runs a test.
-     * @param testFile the test file.
      * @throws Exception if a test or FOP itself fails
      */
-    public void runTest(File testFile) throws Exception {
-        ResultCollector collector = ResultCollector.getInstance();
-        collector.reset();
+    @Test
+    public void runTest() throws Exception {
+        try {
+            ResultCollector collector = ResultCollector.getInstance();
+            collector.reset();
 
-        SAXParserFactory spf = SAXParserFactory.newInstance();
-        spf.setNamespaceAware(true);
-        spf.setValidating(false);
-        SAXParser parser = spf.newSAXParser();
-        XMLReader reader = parser.getXMLReader();
+            SAXParserFactory spf = SAXParserFactory.newInstance();
+            spf.setNamespaceAware(true);
+            spf.setValidating(false);
+            SAXParser parser = spf.newSAXParser();
+            XMLReader reader = parser.getXMLReader();
 
-        //Resetting values modified by processing instructions
-        fopFactory.setBreakIndentInheritanceOnReferenceAreaBoundary(
-                FopFactoryConfigurator.DEFAULT_BREAK_INDENT_INHERITANCE);
-        fopFactory.setSourceResolution(FopFactoryConfigurator.DEFAULT_SOURCE_RESOLUTION);
+            // Resetting values modified by processing instructions
+            fopFactory.setBreakIndentInheritanceOnReferenceAreaBoundary(FopFactoryConfigurator.DEFAULT_BREAK_INDENT_INHERITANCE);
+            fopFactory.setSourceResolution(FopFactoryConfigurator.DEFAULT_SOURCE_RESOLUTION);
 
-        FOUserAgent ua = fopFactory.newFOUserAgent();
-        ua.setBaseURL(testFile.getParentFile().toURI().toURL().toString());
-        ua.setFOEventHandlerOverride(new DummyFOEventHandler(ua));
-        ua.getEventBroadcaster().addEventListener(
-                new ConsoleEventListenerForTests(testFile.getName()));
+            FOUserAgent ua = fopFactory.newFOUserAgent();
+            ua.setBaseURL(testFile.getParentFile().toURI().toURL().toString());
+            ua.setFOEventHandlerOverride(new DummyFOEventHandler(ua));
+            ua.getEventBroadcaster().addEventListener(
+                    new ConsoleEventListenerForTests(testFile.getName()));
 
-        //Used to set values in the user agent through processing instructions
-        reader = new PIListener(reader, ua);
+            // Used to set values in the user agent through processing instructions
+            reader = new PIListener(reader, ua);
 
-        Fop fop = fopFactory.newFop(ua);
+            Fop fop = fopFactory.newFop(ua);
 
-        reader.setContentHandler(fop.getDefaultHandler());
-        reader.setDTDHandler(fop.getDefaultHandler());
-        reader.setErrorHandler(fop.getDefaultHandler());
-        reader.setEntityResolver(fop.getDefaultHandler());
-        try {
-            reader.parse(testFile.toURI().toURL().toExternalForm());
+            reader.setContentHandler(fop.getDefaultHandler());
+            reader.setDTDHandler(fop.getDefaultHandler());
+            reader.setErrorHandler(fop.getDefaultHandler());
+            reader.setEntityResolver(fop.getDefaultHandler());
+            try {
+                reader.parse(testFile.toURI().toURL().toExternalForm());
+            } catch (Exception e) {
+                collector.notifyError(e.getLocalizedMessage());
+                throw e;
+            }
+
+            List results = collector.getResults();
+            if (results.size() > 0) {
+                for (int i = 0; i < results.size(); i++) {
+                    System.out.println((String) results.get(i));
+                }
+                throw new IllegalStateException((String) results.get(0));
+            }
         } catch (Exception e) {
-            collector.notifyError(e.getLocalizedMessage());
+            org.apache.commons.logging.LogFactory.getLog(this.getClass()).info(
+                    "Error on " + testFile.getName());
             throw e;
         }
-
-        List results = collector.getResults();
-        if (results.size() > 0) {
-            for (int i = 0; i < results.size(); i++) {
-                System.out.println((String)results.get(i));
-            }
-            throw new IllegalStateException((String)results.get(0));
-        }
     }
 
-    private class PIListener extends XMLFilterImpl {
+    private static class PIListener extends XMLFilterImpl {
 
         private FOUserAgent userAgent;
 
@@ -120,7 +176,5 @@
             }
             super.processingInstruction(target, data);
         }
-
     }
-
 }
Index: test/java/org/apache/fop/fotreetest/FOTreeUnitTester.java
===================================================================
--- test/java/org/apache/fop/fotreetest/FOTreeUnitTester.java	(revision 1177642)
+++ test/java/org/apache/fop/fotreetest/FOTreeUnitTester.java	(working copy)
@@ -24,15 +24,12 @@
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
-import junit.framework.TestCase;
-
-import org.xml.sax.XMLReader;
-
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.fo.FOEventHandler;
 import org.apache.fop.util.ConsoleEventListenerForTests;
+import org.xml.sax.XMLReader;
 
 
 /**
@@ -40,7 +37,7 @@
  * to parse an FO file and register a proper {@link FOEventHandler}. That handler will be
  * the entry point to test classes from the FObj hierarchy.
  */
-public abstract class FOTreeUnitTester extends TestCase {
+public abstract class FOTreeUnitTester {
 
     private XMLReader foReader;
 
Index: test/java/org/apache/fop/fotreetest/FOTreeTestSuite.java
===================================================================
--- test/java/org/apache/fop/fotreetest/FOTreeTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/fotreetest/FOTreeTestSuite.java	(working copy)
@@ -19,129 +19,20 @@
 
 package org.apache.fop.fotreetest;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Iterator;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.filefilter.AndFileFilter;
-import org.apache.commons.io.filefilter.IOFileFilter;
-import org.apache.commons.io.filefilter.NameFileFilter;
-import org.apache.commons.io.filefilter.PrefixFileFilter;
-import org.apache.commons.io.filefilter.SuffixFileFilter;
-import org.apache.commons.io.filefilter.TrueFileFilter;
-
-import org.apache.fop.DebugHelper;
 import org.apache.fop.fo.flow.table.CollapsedConditionalBorderTestCase;
 import org.apache.fop.fo.flow.table.IllegalRowSpanTestCase;
 import org.apache.fop.fo.flow.table.RowGroupBuilderTestCase;
 import org.apache.fop.fo.flow.table.TableColumnColumnNumberTestCase;
 import org.apache.fop.fo.flow.table.TooManyColumnsTestCase;
-import org.apache.fop.layoutengine.LayoutEngineTestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
 
 /**
  * JUnit test suit for running layout engine test under JUnit control.
  */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({ TooManyColumnsTestCase.class, IllegalRowSpanTestCase.class,
+        RowGroupBuilderTestCase.class, TableColumnColumnNumberTestCase.class,
+        CollapsedConditionalBorderTestCase.class, FOTreeTester.class })
 public final class FOTreeTestSuite {
-
-    static {
-        DebugHelper.registerStandardElementListObservers();
-    }
-
-    private FOTreeTestSuite() {
-        //don't instantiate!
-    }
-
-    /**
-     * @return the test suite with all the tests (one for each XML file)
-     * @throws IOException in case of an I/O problem
-     */
-    public static Test suite() throws IOException {
-        TestSuite suite = new TestSuite();
-        addXMLTestCases(suite);
-        addUnitTestCases(suite);
-        return suite;
-    }
-
-    private static void addXMLTestCases(TestSuite suite) throws IOException {
-        File mainDir = new File("test/fotree");
-
-        final FOTreeTester tester = new FOTreeTester();
-
-        IOFileFilter filter;
-        String single = System.getProperty("fop.fotree.single");
-        String startsWith = System.getProperty("fop.fotree.starts-with");
-        if (single != null) {
-            filter = new NameFileFilter(single);
-        } else if (startsWith != null) {
-            filter = new PrefixFileFilter(startsWith);
-            filter = new AndFileFilter(filter, new SuffixFileFilter(".fo"));
-        } else {
-            filter = new SuffixFileFilter(".fo");
-            filter = LayoutEngineTestSuite.decorateWithDisabledList(filter);
-        }
-        Collection files = FileUtils.listFiles(new File(mainDir, "testcases"),
-                filter, TrueFileFilter.INSTANCE);
-        String privateTests = System.getProperty("fop.fotree.private");
-        if ("true".equalsIgnoreCase(privateTests)) {
-            Collection privateFiles = FileUtils.listFiles(
-                    new File(mainDir, "private-testcases"),
-                    filter, TrueFileFilter.INSTANCE);
-            files.addAll(privateFiles);
-        }
-        Iterator i = files.iterator();
-        while (i.hasNext()) {
-            File f = (File)i.next();
-            addTestCase(suite, tester, f);
-        }
-    }
-
-    private static void addTestCase(TestSuite suite,
-                final FOTreeTester tester, final File f) {
-        suite.addTest(new FOTreeTestCase(f.getName()) {
-            public void runTest() throws Exception {
-                try {
-                    prepare(tester, f);
-                    testMain();
-                } catch (Exception e) {
-                    org.apache.commons.logging.LogFactory.getLog(this.getClass()).info(
-                            "Error on " + f.getName());
-                    throw e;
-                }
-            }
-        });
-    }
-
-    private static void addUnitTestCases(TestSuite suite) {
-        suite.addTestSuite(TooManyColumnsTestCase.class);
-        suite.addTestSuite(IllegalRowSpanTestCase.class);
-        suite.addTestSuite(RowGroupBuilderTestCase.class);
-        suite.addTestSuite(TableColumnColumnNumberTestCase.class);
-        suite.addTestSuite(CollapsedConditionalBorderTestCase.class);
-    }
-
-    private static class FOTreeTestCase extends TestCase {
-
-        private FOTreeTester tester;
-        private File testFile;
-
-        public FOTreeTestCase(String name) {
-            super(name);
-        }
-
-        public void prepare(FOTreeTester tester, File testFile) {
-            //super(testFile.getName());
-            this.tester = tester;
-            this.testFile = testFile;
-        }
-
-        public void testMain() throws Exception {
-            tester.runTest(testFile);
-        }
-    }
 }
Index: test/java/org/apache/fop/BasicDriverTestSuite.java
===================================================================
--- test/java/org/apache/fop/BasicDriverTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/BasicDriverTestSuite.java	(working copy)
@@ -19,24 +19,14 @@
 
 package org.apache.fop;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for basic functionality of FOP's Driver API.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ BasicDriverTestCase.class })
 public class BasicDriverTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Basic functionality test suite for FOP's Driver API");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(BasicDriverTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/UtilityCodeTestSuite.java
===================================================================
--- test/java/org/apache/fop/UtilityCodeTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/UtilityCodeTestSuite.java	(working copy)
@@ -19,9 +19,6 @@
 
 package org.apache.fop;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.fop.events.BasicEventTestCase;
 import org.apache.fop.pdf.FileIDGeneratorTestCase;
 import org.apache.fop.pdf.PDFEncryptionJCETestCase;
@@ -33,33 +30,18 @@
 import org.apache.fop.util.ElementListUtilsTestCase;
 import org.apache.fop.util.PDFNumberTestCase;
 import org.apache.fop.util.XMLResourceBundleTestCase;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for FOP's utility classes.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ PDFNumberTestCase.class, PDFObjectTestCase.class, ColorUtilTestCase.class,
+        BorderPropsTestCase.class, ElementListUtilsTestCase.class, BasicEventTestCase.class,
+        XMLResourceBundleTestCase.class, URIResolutionTestCase.class,
+        FileIDGeneratorTestCase.class, PDFFactoryTestCase.class, PDFEncryptionJCETestCase.class,
+        BitmapImageUtilTestCase.class })
 public class UtilityCodeTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Test suite for FOP's utility classes");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(PDFNumberTestCase.class));
-        suite.addTest(new TestSuite(PDFObjectTestCase.class));
-        suite.addTest(FileIDGeneratorTestCase.suite());
-        suite.addTest(new TestSuite(PDFFactoryTestCase.class));
-        suite.addTest(new TestSuite(ColorUtilTestCase.class));
-        suite.addTest(new TestSuite(BorderPropsTestCase.class));
-        suite.addTest(new TestSuite(ElementListUtilsTestCase.class));
-        suite.addTest(new TestSuite(BasicEventTestCase.class));
-        suite.addTest(new TestSuite(XMLResourceBundleTestCase.class));
-        suite.addTest(new TestSuite(URIResolutionTestCase.class));
-        suite.addTest(new TestSuite(BitmapImageUtilTestCase.class));
-        suite.addTest(new TestSuite(PDFEncryptionJCETestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/fonts/truetype/GlyfTableTestCase.java
===================================================================
--- test/java/org/apache/fop/fonts/truetype/GlyfTableTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/fonts/truetype/GlyfTableTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.fonts.truetype;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -26,12 +28,13 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * Tests {@link GlyfTable}.
  */
-public class GlyfTableTestCase extends TestCase {
+public class GlyfTableTestCase {
 
     private final static class DirData {
 
@@ -50,7 +53,7 @@
 
     private FontFileReader originalFontReader;
 
-    @Override
+    @Before
     public void setUp() throws IOException {
         originalFontReader = new FontFileReader("test/resources/fonts/DejaVuLGCSerif.ttf");
     }
@@ -60,6 +63,7 @@
      *
      * @throws IOException if an I/O error occurs
      */
+    @Test
     public void testPopulateGlyphsWithComposites() throws IOException {
         // Glyph 408 -> U+01D8 "uni01D8" this is a composite glyph.
         int[] composedIndices = setupTest(408);
@@ -77,6 +81,7 @@
      *
      * @throws IOException if an I/O error occurs
      */
+    @Test
     public void testPopulateNoCompositeGlyphs() throws IOException {
         int[] composedIndices = setupTest(36, 37, 38); // "A", "B", "C"
         int[] expected = new int[composedIndices.length];
@@ -90,6 +95,7 @@
      *
      * @throws IOException if an I/O error occurs
      */
+    @Test
     public void testGlyphsNotRemappedTwice() throws IOException {
         int composedGlyph = 12;
         // The order of these glyph indices, must NOT be changed! (see javadoc above)
@@ -108,6 +114,7 @@
      *
      * @throws IOException if an I/O error occurs
      */
+    @Test
     public void testSingleRecursionStep() throws IOException {
         // Glyph 2077 -> U+283F "uni283F" this is composed of a composite glyph (recursive).
         int[] composedIndices = setupTest(2077);
Index: test/java/org/apache/fop/fonts/EncodingModeTest.java
===================================================================
--- test/java/org/apache/fop/fonts/EncodingModeTest.java	(revision 1177642)
+++ test/java/org/apache/fop/fonts/EncodingModeTest.java	(working copy)
@@ -19,15 +19,20 @@
 
 package org.apache.fop.fonts;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
 
-public class EncodingModeTest extends TestCase {
+import org.junit.Test;
+
+public class EncodingModeTest {
+
+    @Test
     public void testGetName() {
         assertEquals("auto", EncodingMode.AUTO.getName());
         assertEquals("single-byte", EncodingMode.SINGLE_BYTE.getName());
         assertEquals("cid", EncodingMode.CID.getName());
     }
 
+    @Test
     public void testGetValue() {
         assertEquals(EncodingMode.AUTO, EncodingMode.getEncodingMode("auto"));
         assertEquals(EncodingMode.SINGLE_BYTE, EncodingMode.getEncodingMode("single-byte"));
Index: test/java/org/apache/fop/fonts/DejaVuLGCSerifTest.java
===================================================================
--- test/java/org/apache/fop/fonts/DejaVuLGCSerifTest.java	(revision 1177642)
+++ test/java/org/apache/fop/fonts/DejaVuLGCSerifTest.java	(working copy)
@@ -19,14 +19,17 @@
 
 package org.apache.fop.fonts;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.File;
 
-import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  *
  */
-public class DejaVuLGCSerifTest extends TestCase {
+public class DejaVuLGCSerifTest {
 
     private FontResolver fontResolver = FontManager.createMinimalFontResolver();
     private CustomFont font;
@@ -37,6 +40,7 @@
      * @throws Exception
      *             if the test fails.
      */
+    @Before
     public void setUp() throws Exception {
         File file = new File("test/resources/fonts/DejaVuLGCSerif.ttf");
         font = FontLoader.loadFont(file, "", true, EncodingMode.AUTO,
@@ -46,6 +50,7 @@
     /**
      * Simple test to see if font name was detected correctly.
      */
+    @Test
     public void testFontName() {
         assertEquals("DejaVuLGCSerif", font.getFontName());
     }
Index: test/java/org/apache/fop/GenericFOPTestCase.java
===================================================================
--- test/java/org/apache/fop/GenericFOPTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/GenericFOPTestCase.java	(working copy)
@@ -18,6 +18,7 @@
 /* $Id$ */
 
 package org.apache.fop;
+import static org.junit.Assert.fail;
 
 import java.io.ByteArrayOutputStream;
 import java.io.StringReader;
@@ -27,17 +28,14 @@
 
 import javax.xml.parsers.SAXParserFactory;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.xml.sax.InputSource;
-
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.util.DigestFilter;
+import org.junit.Before;
+import org.junit.Test;
+import org.xml.sax.InputSource;
 
 /**
  * Framework for simple regression testing.
@@ -47,33 +45,20 @@
  * PDF currently supported) and a MD5 for the result.
  *
  */
-public final class GenericFOPTestCase extends TestCase {
+public final class GenericFOPTestCase {
 
     // configure fopFactory as desired
     private FopFactory fopFactory = FopFactory.newInstance();
 
-    protected SAXParserFactory parserFactory;
+    private SAXParserFactory parserFactory;
 
-    public static Test suite() {
-        TestSuite suite = new TestSuite(GenericFOPTestCase.class);
-        suite.setName("Fop regression tests");
-        return suite;
-    }
-
-    /**
-     * Constructor for FopTest.
-     * @param name the name of the test suite
-     */
-    public GenericFOPTestCase(String name) {
-        super(name);
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         parserFactory = SAXParserFactory.newInstance();
         parserFactory.setNamespaceAware(true);
     }
 
+    @Test
     public void testSimple() throws Exception {
         final String digestIn = "17bf13298796065f7775db8707133aeb";
         final String digestOut = "e2761f51152f6663911e567901596707";
@@ -119,8 +104,7 @@
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         foUserAgent.setCreationDate(new Date(10000));
         MessageDigest outDigest = MessageDigest.getInstance("MD5");
-        DigestOutputStream out
-            = new DigestOutputStream(new ByteArrayOutputStream(), outDigest);
+        DigestOutputStream out = new DigestOutputStream(new ByteArrayOutputStream(), outDigest);
         Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);
         InputSource source = new InputSource(new StringReader(fo));
         DigestFilter filter = new DigestFilter("MD5");
Index: test/java/org/apache/fop/datatypes/URISpecificationTestCase.java
===================================================================
--- test/java/org/apache/fop/datatypes/URISpecificationTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/datatypes/URISpecificationTestCase.java	(working copy)
@@ -19,13 +19,16 @@
 
 package org.apache.fop.datatypes;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
 
+import org.junit.Test;
+
 /**
  * Tests for URISpecification.
  */
-public class URISpecificationTestCase extends TestCase {
+public class URISpecificationTestCase {
 
+    @Test
     public void testGetURL() throws Exception {
         String actual;
 
@@ -42,6 +45,7 @@
         assertEquals("http://localhost/test", actual);
     }
 
+    @Test
     public void testEscapeURI() throws Exception {
         String actual;
 
Index: test/java/org/apache/fop/layoutengine/LayoutEngineTester.java
===================================================================
--- test/java/org/apache/fop/layoutengine/LayoutEngineTester.java	(revision 1177642)
+++ test/java/org/apache/fop/layoutengine/LayoutEngineTester.java	(working copy)
@@ -21,6 +21,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Collection;
 import java.util.List;
 
 import javax.xml.parsers.ParserConfigurationException;
@@ -33,12 +34,7 @@
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.sax.TransformerHandler;
 
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
+import org.apache.fop.DebugHelper;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
@@ -57,41 +53,74 @@
 import org.apache.fop.render.xml.XMLRenderer;
 import org.apache.fop.util.ConsoleEventListenerForTests;
 import org.apache.fop.util.DelegatingContentHandler;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
 
 /**
  * Class for testing the FOP's layout engine using testcases specified in XML
  * files.
  */
+@RunWith(Parameterized.class)
 public class LayoutEngineTester {
+    private static File areaTreeBackupDir;
+    /**
+     * Sets up the class, this is invoked only once.
+     */
+    @BeforeClass
+    public static void makeDirAndRegisterDebugHelper() {
+        DebugHelper.registerStandardElementListObservers();
+        areaTreeBackupDir = new File("build/test-results/layoutengine");
+        areaTreeBackupDir.mkdirs();
+    }
 
+    /**
+     * Creates the parameters for this test.
+     *
+     * @return the list of file arrays populated with test files
+     * @throws IOException if an I/O error occurs while reading the test file
+     */
+    @Parameters
+    public static Collection<File[]> getParameters() throws IOException {
+        return LayoutEngineTestUtils.getTestFiles();
+    }
+
     private TestAssistant testAssistant = new TestAssistant();
 
     private LayoutEngineChecksFactory layoutEngineChecksFactory = new LayoutEngineChecksFactory();
-    private File areaTreeBackupDir;
+
     private IFTester ifTester;
+    private File testFile;
 
     private TransformerFactory tfactory = TransformerFactory.newInstance();
 
     /**
      * Constructs a new instance.
-     * @param areaTreeBackupDir Optional directory that receives the generated
-     *     area tree XML files. May be null.
+     *
+     * @param testFile the test file
      */
-    public LayoutEngineTester(File areaTreeBackupDir) {
-        this.areaTreeBackupDir = areaTreeBackupDir;
+    public LayoutEngineTester(File testFile) {
         this.ifTester = new IFTester(tfactory, areaTreeBackupDir);
+        this.testFile = testFile;
     }
 
     /**
      * Runs a single layout engine test case.
-     * @param testFile Test case to run
      * @throws TransformerException In case of an XSLT/JAXP problem
      * @throws IOException In case of an I/O problem
      * @throws SAXException In case of a problem during SAX processing
      * @throws ParserConfigurationException In case of a problem with the XML parser setup
      */
-    public void runTest(File testFile)
-            throws TransformerException, SAXException, IOException, ParserConfigurationException {
+    @Test
+    public void runTest() throws TransformerException, SAXException, IOException,
+            ParserConfigurationException {
 
         DOMResult domres = new DOMResult();
 
Index: test/java/org/apache/fop/layoutengine/ResultCheck.java
===================================================================
--- test/java/org/apache/fop/layoutengine/ResultCheck.java	(revision 1177642)
+++ test/java/org/apache/fop/layoutengine/ResultCheck.java	(working copy)
@@ -40,9 +40,7 @@
         this.property = node.getAttributes().getNamedItem("property").getNodeValue();
     }
 
-    /* (non-Javadoc)
-     * @see LayoutEngineCheck#check(LayoutResult)
-     */
+    /** {@inheritDoc} */
     public void check(LayoutResult result) {
         FormattingResults results = result.getResults();
         String actual;
@@ -59,7 +57,7 @@
 
     }
 
-    /** @see java.lang.Object#toString() */
+    @Override
     public String toString() {
         return "Property: " + property;
     }
Index: test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
===================================================================
--- test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java	(working copy)
@@ -19,196 +19,14 @@
 
 package org.apache.fop.layoutengine;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.stream.StreamSource;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.filefilter.AndFileFilter;
-import org.apache.commons.io.filefilter.IOFileFilter;
-import org.apache.commons.io.filefilter.NameFileFilter;
-import org.apache.commons.io.filefilter.NotFileFilter;
-import org.apache.commons.io.filefilter.PrefixFileFilter;
-import org.apache.commons.io.filefilter.SuffixFileFilter;
-import org.apache.commons.io.filefilter.TrueFileFilter;
-
-import org.apache.fop.DebugHelper;
-
 /**
  * JUnit test suit for running layout engine test under JUnit control.
  */
-public final class LayoutEngineTestSuite {
-
-    static {
-        DebugHelper.registerStandardElementListObservers();
-    }
-
-    private LayoutEngineTestSuite() {
-        // This is a utility class
-    }
-
-    public static String[] readDisabledTestcases(File f) throws IOException {
-        List lines = new java.util.ArrayList();
-        Source stylesheet = new StreamSource(
-                new File("test/layoutengine/disabled-testcase2filename.xsl"));
-        Source source = new StreamSource(f);
-        Result result = new SAXResult(new FilenameHandler(lines));
-        try {
-            Transformer transformer = TransformerFactory.newInstance().newTransformer(stylesheet);
-            transformer.transform(source, result);
-        } catch (TransformerConfigurationException tce) {
-            throw new RuntimeException(tce.getMessage());
-        } catch (TransformerException te) {
-            throw new RuntimeException(te.getMessage());
-        }
-        return (String[])lines.toArray(new String[lines.size()]);
-    }
-
-    private static class FilenameHandler extends DefaultHandler {
-        private StringBuffer buffer = new StringBuffer(128);
-        private boolean readingFilename = false;
-        private List filenames;
-
-        public FilenameHandler(List filenames) {
-            this.filenames = filenames;
-        }
-
-        public void startElement(String namespaceURI, String localName, String qName,
-                Attributes atts) throws SAXException {
-            if (qName != null && qName.equals("file")) {
-                buffer.setLength(0);
-                readingFilename = true;
-            } else {
-                throw new RuntimeException(
-                        "Unexpected element while reading disabled testcase file names: " + qName);
-            }
-        }
-
-        public void endElement(String namespaceURI, String localName, String qName)
-                    throws SAXException {
-            if (qName != null && qName.equals("file")) {
-                readingFilename = false;
-                filenames.add(buffer.toString());
-            } else {
-                throw new RuntimeException(
-                        "Unexpected element while reading disabled testcase file names: " + qName);
-            }
-        }
-
-        public void characters(char[] ch, int start, int length) throws SAXException {
-            if (readingFilename) {
-                buffer.append(ch, start, length);
-            }
-        }
-    }
-
-    public static IOFileFilter decorateWithDisabledList(IOFileFilter filter) throws IOException {
-        String disabled = System.getProperty("fop.layoutengine.disabled");
-        if (disabled != null && disabled.length() > 0) {
-            filter = new AndFileFilter(new NotFileFilter(
-                           new NameFileFilter(readDisabledTestcases(new File(disabled)))),
-                    filter);
-        }
-        return filter;
-    }
-
-    /**
-     * @return a Collection of File instances containing all the test cases set up for processing.
-     * @throws IOException if there's a problem gathering the list of test files
-     */
-    public static Collection getTestFiles() throws IOException {
-        File mainDir = new File("test/layoutengine");
-        IOFileFilter filter;
-        String single = System.getProperty("fop.layoutengine.single");
-        String startsWith = System.getProperty("fop.layoutengine.starts-with");
-        if (single != null) {
-            filter = new NameFileFilter(single);
-        } else if (startsWith != null) {
-            filter = new PrefixFileFilter(startsWith);
-            filter = new AndFileFilter(filter, new SuffixFileFilter(".xml"));
-            filter = decorateWithDisabledList(filter);
-        } else {
-            filter = new SuffixFileFilter(".xml");
-            filter = decorateWithDisabledList(filter);
-        }
-        String testset = System.getProperty("fop.layoutengine.testset");
-        if (testset == null) {
-            testset = "standard";
-        }
-        Collection files = FileUtils.listFiles(new File(mainDir, testset + "-testcases"),
-                filter, TrueFileFilter.INSTANCE);
-        String privateTests = System.getProperty("fop.layoutengine.private");
-        if ("true".equalsIgnoreCase(privateTests)) {
-            Collection privateFiles = FileUtils.listFiles(
-                    new File(mainDir, "private-testcases"),
-                    filter, TrueFileFilter.INSTANCE);
-            files.addAll(privateFiles);
-        }
-        return files;
-    }
-
-    /**
-     * @return the test suite with all the tests (one for each XML file)
-     * @throws IOException in case of an I/O problem
-     */
-    public static Test suite() throws IOException {
-        TestSuite suite = new TestSuite();
-
-        File backupDir = new File("build/test-results/layoutengine");
-        backupDir.mkdirs();
-
-        Collection files = getTestFiles();
-
-        final LayoutEngineTester tester = new LayoutEngineTester(backupDir);
-        Iterator i = files.iterator();
-        while (i.hasNext()) {
-            File f = (File)i.next();
-            suite.addTest(new LayoutEngineTestCase(f, tester));
-        }
-
-        return suite;
-    }
-
-    private static class LayoutEngineTestCase extends TestCase {
-
-        private final File testFile;
-
-        private final LayoutEngineTester tester;
-
-        LayoutEngineTestCase(File testFile, LayoutEngineTester tester) {
-            super(testFile.getName());
-            this.testFile = testFile;
-            this.tester = tester;
-        }
-
-        @Override
-        protected void runTest() throws Throwable {
-            try {
-                tester.runTest(testFile);
-            } catch (Exception e) {
-                org.apache.commons.logging.LogFactory.getLog(
-                        this.getClass()).error("Error on " + getName());
-                throw e;
-            }
-        }
-    }
+@RunWith(Suite.class)
+@SuiteClasses({ LayoutEngineTester.class })
+public class LayoutEngineTestSuite {
 }
Index: test/java/org/apache/fop/visual/BatchDiffer.java
===================================================================
--- test/java/org/apache/fop/visual/BatchDiffer.java	(revision 1177642)
+++ test/java/org/apache/fop/visual/BatchDiffer.java	(working copy)
@@ -44,7 +44,7 @@
 
 import org.apache.xmlgraphics.image.writer.ImageWriterUtil;
 
-import org.apache.fop.layoutengine.LayoutEngineTestSuite;
+import org.apache.fop.layoutengine.LayoutEngineTestUtils;
 
 /**
  * This class is used to visually diff bitmap images created through various sources.
@@ -164,7 +164,7 @@
             IOFileFilter filter = new SuffixFileFilter(new String[] {".xml", ".fo"});
             //Same filtering as in layout engine tests
             if (cfg.getChild("filter-disabled").getValueAsBoolean(true)) {
-                filter = LayoutEngineTestSuite.decorateWithDisabledList(filter);
+                filter = LayoutEngineTestUtils.decorateWithDisabledList(filter);
             }
             String manualFilter = cfg.getChild("manual-filter").getValue(null);
             if (manualFilter != null) {
Index: test/java/org/apache/fop/fo/flow/table/IllegalRowSpanTestCase.java
===================================================================
--- test/java/org/apache/fop/fo/flow/table/IllegalRowSpanTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/fo/flow/table/IllegalRowSpanTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.fo.flow.table;
 
+import org.junit.Test;
+
 /**
  * Testcase checking that cells spanning further than their parent element aren't
  * accepted.
@@ -29,18 +31,22 @@
         super();
     }
 
+    @Test
     public void testBody1() throws Exception {
         launchTest("table/illegal-row-span_body_1.fo");
     }
 
+    @Test
     public void testBody2() throws Exception {
         launchTest("table/illegal-row-span_body_2.fo");
     }
 
+    @Test
     public void testHeader() throws Exception {
         launchTest("table/illegal-row-span_header.fo");
     }
 
+    @Test
     public void testFooter() throws Exception {
         launchTest("table/illegal-row-span_footer.fo");
     }
Index: test/java/org/apache/fop/fo/flow/table/ErrorCheckTestCase.java
===================================================================
--- test/java/org/apache/fop/fo/flow/table/ErrorCheckTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/fo/flow/table/ErrorCheckTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.fo.flow.table;
 
+import static org.junit.Assert.fail;
+
 import org.apache.fop.fo.ValidationException;
 
 /**
Index: test/java/org/apache/fop/fo/flow/table/TooManyColumnsTestCase.java
===================================================================
--- test/java/org/apache/fop/fo/flow/table/TooManyColumnsTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/fo/flow/table/TooManyColumnsTestCase.java	(working copy)
@@ -19,6 +19,7 @@
 
 package org.apache.fop.fo.flow.table;
 
+import org.junit.Test;
 
 public class TooManyColumnsTestCase extends ErrorCheckTestCase {
 
@@ -26,26 +27,32 @@
         super();
     }
 
+    @Test
     public void testBody1() throws Exception {
         launchTest("table/too-many-columns_body_1.fo");
     }
 
+    @Test
     public void testBody2() throws Exception {
         launchTest("table/too-many-columns_body_2.fo");
     }
 
+    @Test
     public void testBody3() throws Exception {
         launchTest("table/too-many-columns_body_3.fo");
     }
 
+    @Test
     public void testBody4() throws Exception {
         launchTest("table/too-many-columns_body_4.fo");
     }
 
+    @Test
     public void testHeader() throws Exception {
         launchTest("table/too-many-columns_header.fo");
     }
 
+    @Test
     public void testFooter() throws Exception {
         launchTest("table/too-many-columns_footer.fo");
     }
Index: test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java
===================================================================
--- test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.fo.flow.table;
 
+import static org.junit.Assert.assertEquals;
+
 import java.awt.Color;
 import java.util.Iterator;
 import java.util.List;
@@ -26,6 +28,7 @@
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.FONode.FONodeIterator;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo;
+import org.junit.Test;
 
 /**
  * A testcase for the resolution of collapsed borders in the FO tree, taking
@@ -130,6 +133,7 @@
                 (Color) resolvedBorder[1]);
     }
 
+    @Test
     public void testCollapsedConditionalBorders() throws Exception {
         setUp("table/collapsed-conditional-borders.fo");
         int tableNum = 0;
@@ -154,6 +158,7 @@
         } while (tableIterator.hasNext());
     }
 
+    @Test
     public void testCollapsedConditionalBordersHeaderFooter() throws Exception {
         setUp("table/collapsed-conditional-borders_header-footer.fo");
         int tableNum = 0;
Index: test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java
===================================================================
--- test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java	(working copy)
@@ -19,9 +19,16 @@
 
 package org.apache.fop.fo.flow.table;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Iterator;
 import java.util.List;
 
+import org.junit.Test;
+
 /**
  * Tests that RowGroupBuilder returns, for each part of a table, the expected number of
  * row-groups with the expected number or rows in each.
@@ -137,34 +144,42 @@
         checkNextTableRowGroups(tableIter, new int[] {2}, new int[] {1, 3}, new int[][] {{2, 1, 3}});
     }
 
+    @Test
     public void testWithRowsSimple() throws Exception {
         checkSimple("table/RowGroupBuilder_simple.fo");
     }
 
+    @Test
     public void testWithRowsSpans() throws Exception {
         checkSpans("table/RowGroupBuilder_spans.fo");
     }
 
+    @Test
     public void testNoRowSimple() throws Exception {
         checkSimple("table/RowGroupBuilder_no-row_simple.fo");
     }
 
+    @Test
     public void testNoRowSpans() throws Exception {
         checkSpans("table/RowGroupBuilder_no-row_spans.fo");
     }
 
+    @Test
     public void testNoColWithRowsSimple() throws Exception {
         checkSimple("table/RowGroupBuilder_no-col_simple.fo");
     }
 
+    @Test
     public void testNoColWithRowsSpans() throws Exception {
         checkSpans("table/RowGroupBuilder_no-col_spans.fo");
     }
 
+    @Test
     public void testNoColNoRowSimple() throws Exception {
         checkSimple("table/RowGroupBuilder_no-col_no-row_simple.fo");
     }
 
+    @Test
     public void testNoColNoRowSpans() throws Exception {
         checkSpans("table/RowGroupBuilder_no-col_no-row_spans.fo");
     }
Index: test/java/org/apache/fop/fo/flow/table/TableColumnColumnNumberTestCase.java
===================================================================
--- test/java/org/apache/fop/fo/flow/table/TableColumnColumnNumberTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/fo/flow/table/TableColumnColumnNumberTestCase.java	(working copy)
@@ -19,10 +19,13 @@
 
 package org.apache.fop.fo.flow.table;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.Iterator;
 
 import org.apache.fop.datatypes.PercentBaseContext;
 import org.apache.fop.fo.FObj;
+import org.junit.Test;
 
 
 public class TableColumnColumnNumberTestCase extends AbstractTableTestCase {
@@ -61,6 +64,7 @@
         assertEquals(width, c.getColumnWidth().getValue(percentBaseContext));
     }
 
+    @Test
     public void testColumnNumber() throws Exception {
         setUp("table/table-column_column-number.fo");
         Iterator tableIter = getTableIterator();
@@ -97,6 +101,7 @@
         }
     }
 
+    @Test
     public void testImplicitColumns() throws Exception {
         setUp("table/implicit_columns_column-number.fo");
         percentBaseContext.setUnitaryWidth(100000);
Index: test/java/org/apache/fop/events/BasicEventTestCase.java
===================================================================
--- test/java/org/apache/fop/events/BasicEventTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/events/BasicEventTestCase.java	(working copy)
@@ -19,12 +19,18 @@
 
 package org.apache.fop.events;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import org.apache.fop.events.model.EventSeverity;
+import org.junit.Test;
 
-public class BasicEventTestCase extends TestCase {
+public class BasicEventTestCase {
 
+    @Test
     public void testBasics() throws Exception {
 
         MyEventListener listener = new MyEventListener();
@@ -54,6 +60,7 @@
         broadcaster.broadcastEvent(ev);
     }
 
+    @Test
     public void testEventProducer() throws Exception {
         MyEventListener listener = new MyEventListener();
 
Index: test/java/org/apache/fop/events/EventChecker.java
===================================================================
--- test/java/org/apache/fop/events/EventChecker.java	(revision 1177642)
+++ test/java/org/apache/fop/events/EventChecker.java	(working copy)
@@ -19,12 +19,12 @@
 
 package org.apache.fop.events;
 
-import junit.framework.Assert;
+import static org.junit.Assert.fail;
 
 /**
  * Class that checks that an expected event is produced, and only this one.
  */
-class EventChecker extends Assert implements EventListener {
+class EventChecker implements EventListener {
 
     private final String expectedEventID;
 
Index: test/java/org/apache/fop/events/EventProcessingTestCase.java
===================================================================
--- test/java/org/apache/fop/events/EventProcessingTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/events/EventProcessingTestCase.java	(working copy)
@@ -29,14 +29,7 @@
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
 import org.apache.commons.io.output.NullOutputStream;
-
-import org.apache.xmlgraphics.util.MimeConstants;
-
 import org.apache.fop.ResourceEventProducer;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.Fop;
@@ -47,11 +40,13 @@
 import org.apache.fop.fonts.FontEventProducer;
 import org.apache.fop.layoutmgr.BlockLevelEventProducer;
 import org.apache.fop.layoutmgr.inline.InlineLevelEventProducer;
+import org.apache.xmlgraphics.util.MimeConstants;
+import org.junit.Test;
 
 /**
  * Tests that the event notification system runs smoothly.
  */
-public class EventProcessingTestCase extends TestCase {
+public class EventProcessingTestCase {
 
     private final FopFactory fopFactory = FopFactory.newInstance();
 
@@ -59,8 +54,7 @@
 
     private final File basedir;
 
-    public EventProcessingTestCase(String name) {
-        super(name);
+    public EventProcessingTestCase() {
         String base = System.getProperty("basedir");
         if (base != null) {
             basedir = new File(base);
@@ -81,45 +75,45 @@
         eventChecker.end();
     }
 
+    @Test
     public void testArea() throws FOPException, TransformerException {
         doTest("area.fo",
                 AreaEventProducer.class.getName() + ".unresolvedIDReferenceOnPage");
     }
 
+    @Test
     public void testResource() throws FOPException, TransformerException {
         doTest("resource.fo",
                 ResourceEventProducer.class.getName() + ".imageNotFound");
     }
 
+    @Test
     public void testValidation() throws FOPException, TransformerException {
         doTest("validation.fo",
                 FOValidationEventProducer.class.getName() + ".invalidPropertyValue");
     }
 
+    @Test
     public void testTable() throws FOPException, TransformerException {
         doTest("table.fo",
                 TableEventProducer.class.getName() + ".noTablePaddingWithCollapsingBorderModel");
     }
 
+    @Test
     public void testBlockLevel() throws FOPException, TransformerException {
         doTest("block-level.fo",
                 BlockLevelEventProducer.class.getName() + ".overconstrainedAdjustEndIndent");
     }
 
+    @Test
     public void testInlineLevel() throws FOPException, TransformerException {
         doTest("inline-level.fo",
                 InlineLevelEventProducer.class.getName() + ".lineOverflows");
     }
 
+    @Test
     public void testFont() throws FOPException, TransformerException {
         doTest("font.fo",
                 FontEventProducer.class.getName() + ".fontSubstituted");
     }
-
-
-    public static Test suite() {
-        TestSuite suite = new TestSuite();
-        suite.addTestSuite(EventProcessingTestCase.class);
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/area/RegionViewportTestCase.java
===================================================================
--- test/java/org/apache/fop/area/RegionViewportTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/area/RegionViewportTestCase.java	(working copy)
@@ -22,6 +22,8 @@
 import java.awt.Rectangle;
 import java.awt.geom.Rectangle2D;
 
+import org.junit.Test;
+
 /**
  * Tests the {@linkplain RegionViewport} class.
  */
@@ -35,11 +37,13 @@
         return viewport;
     }
 
+    @Test
     public void testNonClip() throws Exception {
         RegionViewport viewport = createRegionViewport(10, 10, 100, 20);
         checkNonClip(viewport);
     }
 
+    @Test
     public void testClip() throws Exception {
         int ipd = 150;
         int bpd = 20;
Index: test/java/org/apache/fop/area/BlockViewportTestCase.java
===================================================================
--- test/java/org/apache/fop/area/BlockViewportTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/area/BlockViewportTestCase.java	(working copy)
@@ -19,12 +19,14 @@
 
 package org.apache.fop.area;
 
+import org.junit.Test;
 
 /**
  * Tests the {@linkplain BlockViewport} class.
  */
 public class BlockViewportTestCase extends ViewportTestCase {
 
+    @Test
     public void testNonClip() throws Exception {
         BlockViewport bv = new BlockViewport();
         bv.setIPD(100);
@@ -32,6 +34,7 @@
         checkNonClip(bv);
     }
 
+    @Test
     public void testClip() throws Exception {
         BlockViewport bv = new BlockViewport();
         int ipd = 100;
Index: test/java/org/apache/fop/area/ViewportTestSuite.java
===================================================================
--- test/java/org/apache/fop/area/ViewportTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/area/ViewportTestSuite.java	(working copy)
@@ -19,29 +19,16 @@
 
 package org.apache.fop.area;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.fop.area.inline.InlineViewportTestCase;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * A suite of all the tests relating to the {@linkplain Viewport} interface.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ RegionViewportTestCase.class, BlockViewportTestCase.class,
+        InlineViewportTestCase.class })
 public final class ViewportTestSuite {
-
-    private ViewportTestSuite() { }
-
-    /**
-     * Returns the suite of {@linkplain Viewport} implementation tests.
-     *
-     * @return the tests
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite("Tests for viewport-areas");
-        suite.addTestSuite(RegionViewportTestCase.class);
-        suite.addTestSuite(BlockViewportTestCase.class);
-        suite.addTestSuite(InlineViewportTestCase.class);
-        return suite;
-    }
-
 }
Index: test/java/org/apache/fop/area/ViewportTestCase.java
===================================================================
--- test/java/org/apache/fop/area/ViewportTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/area/ViewportTestCase.java	(working copy)
@@ -19,14 +19,17 @@
 
 package org.apache.fop.area;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 import java.awt.Rectangle;
 
-import junit.framework.TestCase;
-
 /**
  * Tests implementations of the {@linkplain Viewport} interface.
  */
-public abstract class ViewportTestCase extends TestCase {
+public abstract class ViewportTestCase {
 
     protected void checkNonClip(Viewport v) throws Exception {
         assertFalse(v.hasClip());
Index: test/java/org/apache/fop/area/inline/InlineViewportTestCase.java
===================================================================
--- test/java/org/apache/fop/area/inline/InlineViewportTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/area/inline/InlineViewportTestCase.java	(working copy)
@@ -20,12 +20,14 @@
 package org.apache.fop.area.inline;
 
 import org.apache.fop.area.ViewportTestCase;
+import org.junit.Test;
 
 /**
  * Tests the {@linkplain InlineViewport} class.
  */
 public class InlineViewportTestCase extends ViewportTestCase {
 
+    @Test
     public void testNonClip() throws Exception {
         InlineViewport v = new InlineViewport(null);
         v.setIPD(50);
@@ -33,6 +35,7 @@
         checkNonClip(v);
     }
 
+    @Test
     public void testClip() throws Exception {
         InlineViewport v = new InlineViewport(null);
         int ipd = 50;
Index: test/java/org/apache/fop/BasicDriverTestCase.java
===================================================================
--- test/java/org/apache/fop/BasicDriverTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/BasicDriverTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 
 import javax.xml.transform.Result;
@@ -34,6 +36,7 @@
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.cli.InputHandler;
+import org.junit.Test;
 
 /**
  * Basic runtime test for the old Fop class. It is used to verify that
@@ -44,16 +47,10 @@
     private FopFactory fopFactory = FopFactory.newInstance();
 
     /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public BasicDriverTestCase(String name) {
-        super(name);
-    }
-
-    /**
      * Tests Fop with JAXP and OutputStream generating PDF.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO2PDFWithJAXP() throws Exception {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
@@ -73,6 +70,7 @@
      * Tests Fop with JAXP and OutputStream generating PostScript.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO2PSWithJAXP() throws Exception {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
@@ -92,6 +90,7 @@
      * Tests Fop with JAXP and OutputStream generating RTF.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO2RTFWithJAXP() throws Exception {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
@@ -111,6 +110,7 @@
      * Tests Fop with XsltInputHandler and OutputStream.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO2PDFWithXSLTInputHandler() throws Exception {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         File xmlFile = new File(getBaseDir(), "test/xml/1.xml");
Index: test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java
===================================================================
--- test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java	(working copy)
@@ -22,6 +22,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.Collection;
 
 import javax.xml.transform.Result;
 import javax.xml.transform.Source;
@@ -32,25 +33,39 @@
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.sax.TransformerHandler;
 
-import org.w3c.dom.Document;
-
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
-import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.area.AreaTreeModel;
 import org.apache.fop.area.AreaTreeParser;
 import org.apache.fop.area.RenderPagesModel;
 import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.layoutengine.LayoutEngineTestUtils;
 import org.apache.fop.render.Renderer;
 import org.apache.fop.render.xml.XMLRenderer;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+import org.w3c.dom.Document;
 
 /**
  * Tests the area tree parser.
  */
+@RunWith(Parameterized.class)
 public class AreaTreeParserTestCase extends AbstractIntermediateTestCase {
 
     /**
+     * Creates the parameters for this test.
+     *
+     * @return the list of file arrays populated with test files
+     * @throws IOException if an I/O error occurs while reading the test file
+     */
+    @Parameters
+    public static Collection<File[]> getParameters() throws IOException {
+        return LayoutEngineTestUtils.getTestFiles();
+    }
+    /**
      * Constructor for the test suite that is used for each test file.
      * @param testFile the test file to run
      * @throws IOException
@@ -132,4 +147,17 @@
         return (Document)domResult.getNode();
     }
 
+    @Override
+    @Test
+    public void runTest() throws Exception {
+        try {
+            testParserToIntermediateFormat();
+            testParserToPDF();
+        } catch (Exception e) {
+            org.apache.commons.logging.LogFactory.getLog(this.getClass()).error(
+                    "Error on " + testFile.getName());
+            throw e;
+        }
+    }
+
 }
Index: test/java/org/apache/fop/intermediate/IFMimickingTestCase.java
===================================================================
--- test/java/org/apache/fop/intermediate/IFMimickingTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/intermediate/IFMimickingTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.intermediate;
 
+import static org.junit.Assert.fail;
+
 import java.io.File;
 
 import javax.xml.transform.ErrorListener;
@@ -29,8 +31,6 @@
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
@@ -44,17 +44,23 @@
 import org.apache.fop.render.intermediate.IFDocumentHandler;
 import org.apache.fop.render.intermediate.IFException;
 import org.apache.fop.render.intermediate.IFSerializer;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * This test checks the correct mimicking of a different output format.
  */
-public class IFMimickingTestCase extends TestCase {
+public class IFMimickingTestCase {
 
     private FopFactory fopFactory;
 
-    /** {@inheritDoc} */
-    protected void setUp() throws Exception {
-        super.setUp();
+    /**
+     * Setting up prior to running tests
+     *
+     * @throws Exception if an error occurs
+     */
+    @Before
+    public void setUp() throws Exception {
         fopFactory = FopFactory.newInstance();
         File configFile = new File("test/test-no-xml-metrics.xconf");
         fopFactory.setUserConfig(configFile);
@@ -64,6 +70,7 @@
      * Tests IF document handler mimicking with PDF output.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testMimickingPDF() throws Exception {
         doTestMimicking(MimeConstants.MIME_PDF);
     }
@@ -72,6 +79,7 @@
      * Tests IF document handler mimicking with PostScript output.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testMimickingPS() throws Exception {
         doTestMimicking(MimeConstants.MIME_POSTSCRIPT);
     }
@@ -80,6 +88,7 @@
      * Tests IF document handler mimicking with TIFF output.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testMimickingTIFF() throws Exception {
         doTestMimicking(MimeConstants.MIME_TIFF);
     }
Index: test/java/org/apache/fop/intermediate/LayoutIFTestSuite.java
===================================================================
--- test/java/org/apache/fop/intermediate/LayoutIFTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/intermediate/LayoutIFTestSuite.java	(working copy)
@@ -19,46 +19,14 @@
 
 package org.apache.fop.intermediate;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Iterator;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.fop.layoutengine.LayoutEngineTestSuite;
-
 /**
  * JUnit test suite for the intermediate format
  */
+@RunWith(Suite.class)
+@SuiteClasses({ IFParserTestCase.class })
 public final class LayoutIFTestSuite {
-
-    private LayoutIFTestSuite() {
-        // This is a utility class
-    }
-
-    /**
-     * @return the test suite with all the tests (one for each XML file)
-     * @throws IOException in case of an I/O problem
-     */
-    public static Test suite() throws IOException {
-        TestSuite suite = new TestSuite();
-
-        Collection files = LayoutEngineTestSuite.getTestFiles();
-
-        Iterator i = files.iterator();
-        while (i.hasNext()) {
-            File f = (File)i.next();
-            addIFTestCase(suite, f);
-        }
-
-        return suite;
-    }
-
-    private static void addIFTestCase(TestSuite suite,
-            final File f) throws IOException {
-        suite.addTest(new IFParserTestCase(f));
-    }
-
 }
Index: test/java/org/apache/fop/intermediate/IFParserTestCase.java
===================================================================
--- test/java/org/apache/fop/intermediate/IFParserTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/intermediate/IFParserTestCase.java	(working copy)
@@ -22,26 +22,43 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.Collection;
 
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.stream.StreamResult;
 
-import org.w3c.dom.Document;
-
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.layoutengine.LayoutEngineTestUtils;
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
 import org.apache.fop.render.intermediate.IFParser;
 import org.apache.fop.render.intermediate.IFSerializer;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+import org.w3c.dom.Document;
 
 /**
  * Tests the intermediate format parser.
  */
+@RunWith(Parameterized.class)
 public class IFParserTestCase extends AbstractIFTestCase {
 
     /**
+     * Gets the parameters for this test
+     *
+     * @return a collection of file arrays containing the test files
+     * @throws IOException if an error occurs when trying to read the test files
+     */
+    @Parameters
+    public static Collection<File[]> getParameters() throws IOException {
+        return LayoutEngineTestUtils.getTestFiles();
+    }
+
+    /**
      * Constructor for the test suite that is used for each test file.
      * @param testFile the test file to run
      * @throws IOException if an I/O error occurs while loading the test case
@@ -81,11 +98,15 @@
         return (Document)domResult.getNode();
     }
 
-    /** {@inheritDoc} */
-    @Override
+    @Test
     public void runTest() throws Exception {
-        testParserToIntermediateFormat();
-        testParserToPDF();
+        try {
+            testParserToIntermediateFormat();
+            testParserToPDF();
+        } catch (Exception e) {
+            org.apache.commons.logging.LogFactory.getLog(this.getClass()).error(
+                    "Error on " + testFile.getName());
+            throw e;
+        }
     }
-
 }
Index: test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java
===================================================================
--- test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/intermediate/AbstractIntermediateTestCase.java	(working copy)
@@ -33,23 +33,23 @@
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.dom.DOMSource;
 
-import org.custommonkey.xmlunit.XMLTestCase;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.NullOutputStream;
-
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.events.model.EventSeverity;
 import org.apache.fop.util.ConsoleEventListenerForTests;
+import org.custommonkey.xmlunit.XMLAssert;
+import org.junit.After;
+import org.junit.Before;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
 
 /**
  * Abstract base class for intermediate format tests.
  */
-public abstract class AbstractIntermediateTestCase extends XMLTestCase {
+public abstract class AbstractIntermediateTestCase {
 
     /** the test environment */
     protected static TestAssistant testAssistant = new TestAssistant();
@@ -76,30 +76,27 @@
      */
     public AbstractIntermediateTestCase(File testFile)
             throws IOException {
-        super(testFile.getName());
         this.testFile = testFile;
     }
 
-    /** {@inheritDoc} */
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {
         setupOutputDirectory();
         this.testDoc = testAssistant.loadTestCase(testFile);
         this.fopFactory = testAssistant.getFopFactory(testDoc);
         intermediate = buildIntermediateDocument(testAssistant.getTestcase2FOStylesheet());
         if (outputDir != null) {
             testAssistant.saveDOM(intermediate, new File(outputDir,
-                    getName() + ".1" + getIntermediateFileExtension()));
+                    testFile.getName() + ".1" + getIntermediateFileExtension()));
         }
     }
 
-    /** {@inheritDoc} */
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         //Release memory
         this.intermediate = null;
         this.fopFactory = null;
         this.testDoc = null;
-        super.tearDown();
     }
 
     /**
@@ -172,11 +169,12 @@
         Source src = new DOMSource(intermediate);
         Document doc = parseAndRenderToIntermediateFormat(src);
         if (outputDir != null) {
-            File tgtFile = new File(outputDir, getName() + ".2" + getIntermediateFileExtension());
+            File tgtFile = new File(outputDir, testFile.getName() + ".2"
+                    + getIntermediateFileExtension());
             testAssistant.saveDOM(doc, tgtFile);
         }
 
-        assertXMLEqual(intermediate, doc);
+        XMLAssert.assertXMLEqual(intermediate, doc);
     }
 
     /**
@@ -195,7 +193,7 @@
     public void testParserToPDF() throws Exception {
         OutputStream out;
         if (outputDir != null) {
-            File tgtFile = new File(outputDir, getName() + ".pdf");
+            File tgtFile = new File(outputDir, testFile.getName() + ".pdf");
             out = new FileOutputStream(tgtFile);
             out = new BufferedOutputStream(out);
         } else {
@@ -219,6 +217,13 @@
             throws Exception;
 
     /**
+     * Run the test.
+     *
+     * @throws Exception if an error occurs during the test
+     */
+    public abstract void runTest() throws Exception;
+
+    /**
      * Sets an error listener which doesn't swallow errors like Xalan's default one.
      * @param transformer the transformer to set the error listener on
      */
Index: test/java/org/apache/fop/intermediate/IFTestCase.java
===================================================================
--- test/java/org/apache/fop/intermediate/IFTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/intermediate/IFTestCase.java	(working copy)
@@ -20,11 +20,20 @@
 package org.apache.fop.intermediate;
 
 import java.io.File;
+import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collection;
 
 import javax.xml.transform.Source;
+import javax.xml.transform.TransformerFactory;
 
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -33,10 +42,41 @@
 /**
  * Test case for the IF output.
  */
+@RunWith(Parameterized.class)
 public class IFTestCase extends AbstractIFTestCase {
 
-    private final IFTester ifTester;
+    /**
+     * Gets the files for this test.
+     *
+     * @return a collection of file arrays containing the files to test
+     * @throws IOException if an error occurs when reading the test files
+     */
+    @Parameters
+    public static Collection<File[]> getParameters() throws IOException {
+        File testDir = new File("test/intermediate");
+        String[] tests = testDir.list(new FilenameFilter() {
 
+            public boolean accept(File dir, String name) {
+                return name.endsWith(".xml");
+            }
+        });
+
+        Collection<File[]> parameters = new ArrayList<File[]>();
+        for (String test : tests) {
+            parameters.add(new File[] { new File(testDir, test) });
+        }
+        return parameters;
+    }
+
+    private static IFTester ifTester;
+
+    @BeforeClass
+    public static void makeDirs() {
+        File backupDir = new File("build/test-results/intermediate");
+        backupDir.mkdirs();
+        ifTester = new IFTester(TransformerFactory.newInstance(), backupDir);
+    }
+
     /**
      * Creates a new test case.
      *
@@ -44,15 +84,14 @@
      * @param ifTester the helper instance that will perform checks
      * @throws IOException if an I/O error occurs while loading the test case
      */
-    public IFTestCase(File test, IFTester ifTester) throws IOException {
+    public IFTestCase(File test) throws IOException {
         super(test);
-        this.ifTester = ifTester;
         this.testDir = test.getParentFile();
     }
 
     /** {@inheritDoc} */
-    @Override
-    protected void runTest() throws Exception {
+    @Test
+    public void runTest() throws Exception {
         Element testRoot = testAssistant.getTestRoot(testFile);
         NodeList nodes = testRoot.getElementsByTagName("if-checks");
         if (nodes.getLength() == 0) {
@@ -61,7 +100,7 @@
         Element ifChecks = (Element) nodes.item(0);
 
         Document doc = buildIntermediateDocument(testAssistant.getTestcase2FOStylesheet());
-        ifTester.doIFChecks(getName(), ifChecks, doc);
+        ifTester.doIFChecks(testFile.getName(), ifChecks, doc);
     }
 
     @Override
Index: test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java
===================================================================
--- test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java	(working copy)
@@ -19,53 +19,14 @@
 
 package org.apache.fop.intermediate;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Iterator;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.fop.layoutengine.LayoutEngineTestSuite;
-
 /**
  * JUnit test suite for the area tree XML format
  */
+@RunWith(Suite.class)
+@SuiteClasses({ AreaTreeParserTestCase.class })
 public class AreaTreeXMLFormatTestSuite {
-
-    /**
-     * @return the test suite with all the tests (one for each XML file)
-     * @throws IOException in case of an I/O problem
-     */
-    public static Test suite() throws IOException {
-        TestSuite suite = new TestSuite();
-
-        Collection files = LayoutEngineTestSuite.getTestFiles();
-
-        Iterator i = files.iterator();
-        while (i.hasNext()) {
-            File f = (File)i.next();
-            addATTestCase(suite, f);
-        }
-
-        return suite;
-    }
-
-    private static void addATTestCase(TestSuite suite,
-            final File f) throws IOException {
-        suite.addTest(new AreaTreeParserTestCase(f) {
-            public void runTest() throws Exception {
-                try {
-                    testParserToIntermediateFormat();
-                    testParserToPDF();
-                } catch (Exception e) {
-                    org.apache.commons.logging.LogFactory.getLog(
-                            this.getClass()).error("Error on " + f.getName());
-                    throw e;
-                }
-            }
-        });
-    }
-
 }
Index: test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java
===================================================================
--- test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java	(working copy)
@@ -19,49 +19,14 @@
 
 package org.apache.fop.intermediate;
 
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
-import javax.xml.transform.TransformerFactory;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 /**
  * A test suite for testing the Intermediate Format output.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ IFTestCase.class })
 public final class IntermediateFormatTestSuite {
-
-    private IntermediateFormatTestSuite() {
-        // This is a utility class
-    }
-
-    /**
-     * Creates a suite of Intermediate Format tests.
-     *
-     * @return the test suite
-     * @throws IOException if an I/O error occurs while loading one of the tests
-     */
-    public static Test suite() throws IOException {
-
-        File backupDir = new File("build/test-results/intermediate");
-        backupDir.mkdirs();
-
-        IFTester ifTester = new IFTester(TransformerFactory.newInstance(), backupDir);
-
-        TestSuite suite = new TestSuite();
-        File testDir = new File("test/intermediate");
-        String[] tests = testDir.list(new FilenameFilter() {
-
-            public boolean accept(File dir, String name) {
-                return name.endsWith(".xml");
-            }
-        });
-        for (String test : tests) {
-            File testFile = new File(testDir, test);
-            suite.addTest(new IFTestCase(testFile, ifTester));
-        }
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/KnuthAlgorithmTestCase.java
===================================================================
--- test/java/org/apache/fop/KnuthAlgorithmTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/KnuthAlgorithmTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.List;
 
 import org.apache.fop.layoutmgr.BlockKnuthSequence;
@@ -28,17 +30,16 @@
 import org.apache.fop.layoutmgr.KnuthGlue;
 import org.apache.fop.layoutmgr.KnuthPenalty;
 import org.apache.fop.layoutmgr.KnuthSequence;
+import org.junit.Before;
+import org.junit.Test;
 
-import junit.framework.TestCase;
-
 /**
  * Tests the Knuth algorithm implementation.
  */
-public class KnuthAlgorithmTestCase extends TestCase {
+public class KnuthAlgorithmTestCase {
 
-    /** @see junit.framework.TestCase#setUp() */
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() {
         DebugHelper.registerStandardElementListObservers();
     }
 
@@ -67,6 +68,7 @@
      * possibility.
      * @throws Exception if an error occurs
      */
+    @Test
     public void test1() throws Exception {
         MyBreakingAlgorithm algo = new MyBreakingAlgorithm(0, 0, true, true, 0);
         algo.setConstantLineWidth(30000);
Index: test/java/org/apache/fop/render/extensions/prepress/PageScaleTest.java
===================================================================
--- test/java/org/apache/fop/render/extensions/prepress/PageScaleTest.java	(revision 1177642)
+++ test/java/org/apache/fop/render/extensions/prepress/PageScaleTest.java	(working copy)
@@ -19,32 +19,21 @@
 
 package org.apache.fop.render.extensions.prepress;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
 import java.awt.geom.Point2D;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 /**
  * Tests for the fox:scale extension property.
  */
-public class PageScaleTest extends TestCase {
+public class PageScaleTest {
 
-    /**
-     * Default constructor.
-     */
-    public PageScaleTest() {
-        super();
-    }
-
-    /**
-     * Creates a test case with the given name.
-     *
-     * @param name name for the test case
-     */
-    public PageScaleTest(String name) {
-        super(name);
-    }
-
     /** 1 value is used for both x and y. */
+    @Test
     public void testScale1() {
         Point2D res = PageScale.getScale(".5");
         assertEquals(0.5, res.getX(), 0.0);
@@ -52,6 +41,7 @@
     }
 
     /** Two values, used resp. for x and y. */
+    @Test
     public void testScale2() {
         Point2D res = PageScale.getScale("1. \t \n 1.2");
         assertEquals(1.0, res.getX(), 0.0);
@@ -59,6 +49,7 @@
     }
 
     /** Scale must not contain units. */
+    @Test
     public void testScaleFail() {
         try {
             PageScale.getScale("0.5mm 0.5cm");
@@ -69,6 +60,7 @@
     }
 
     /** @{code null} is returned when scale is unspecified. */
+    @Test
     public void testScaleNull() {
         Point2D res = PageScale.getScale(null);
         assertNull("Result should be null", res);
Index: test/java/org/apache/fop/render/extensions/prepress/PageBoundariesTest.java
===================================================================
--- test/java/org/apache/fop/render/extensions/prepress/PageBoundariesTest.java	(revision 1177642)
+++ test/java/org/apache/fop/render/extensions/prepress/PageBoundariesTest.java	(working copy)
@@ -19,15 +19,19 @@
 
 package org.apache.fop.render.extensions.prepress;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
 import java.awt.Dimension;
 import java.awt.Rectangle;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 /**
  * Tests for the fox:bleed, fox:crop-offset, fox:crop-box extension properties.
  */
-public class PageBoundariesTest extends TestCase {
+public class PageBoundariesTest {
 
     private static final Dimension TEST_AREA_SIZE = new Dimension(20000, 15000);
 
@@ -37,22 +41,8 @@
 
     private static final String CROP_OFFSET = "8pt";
 
-    /**
-     * Default constructor.
-     */
-    public PageBoundariesTest() {
-    }
-
-    /**
-     * Creates a test case with the given name.
-     *
-     * @param name name for the test case
-     */
-    public PageBoundariesTest(String name) {
-        super(name);
-    }
-
     /** Test for page boundaries. */
+    @Test
     public void testBoundaries1() {
         PageBoundaries boundaries = new PageBoundaries(TEST_AREA_SIZE, BLEED, CROP_OFFSET, null);
         assertEquals(TEST_AREA, boundaries.getTrimBox());
@@ -73,6 +63,7 @@
     }
 
     /** Test for page boundaries. */
+    @Test
     public void testBoundaries2() {
         PageBoundaries boundaries = new PageBoundaries(
                 TEST_AREA_SIZE, BLEED, null, null);
@@ -86,6 +77,7 @@
     }
 
     /** Two values for the properties. */
+    @Test
     public void testBoundaries2Values() {
         PageBoundaries boundaries = new PageBoundaries(
                 TEST_AREA_SIZE, "5pt  10pt", "6pt \t 12pt", null);
@@ -103,6 +95,7 @@
     }
 
     /** Three values for the properties. */
+    @Test
     public void testBoundaries3Values() {
         PageBoundaries boundaries = new PageBoundaries(
                 TEST_AREA_SIZE, "5pt  10pt 7pt", "6pt \t 12pt 14pt", null);
@@ -120,6 +113,7 @@
     }
 
     /** Four values for the properties. */
+    @Test
     public void testBoundaries4Values() {
         PageBoundaries boundaries = new PageBoundaries(
                 TEST_AREA_SIZE, "5pt  6pt 7pt   8pt", "9pt 10pt  11pt 12pt", null);
@@ -137,6 +131,7 @@
     }
 
     /** Test for the different values of crop-box. */
+    @Test
     public void testCropBox() {
         PageBoundaries boundaries = new PageBoundaries(TEST_AREA_SIZE, BLEED, CROP_OFFSET, null);
         assertEquals(boundaries.getMediaBox(), boundaries.getCropBox());
@@ -155,6 +150,7 @@
     }
 
     /** Test for default values returned when properties are null. */
+    @Test
     public void testBoundariesNull() {
         PageBoundaries b = new PageBoundaries(TEST_AREA_SIZE, null, null, null);
 
@@ -165,6 +161,7 @@
     }
 
     /** Units must be specified. */
+    @Test
     public void testBoundariesFail() {
         try {
             new PageBoundaries(TEST_AREA_SIZE, "0", null, null);
Index: test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
===================================================================
--- test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java	(working copy)
@@ -18,13 +18,16 @@
 /* $Id$ */
 
 package org.apache.fop.render.ps;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 
 import org.apache.commons.io.IOUtils;
-
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.render.intermediate.IFContext;
 import org.apache.xmlgraphics.ps.DSCConstants;
 import org.apache.xmlgraphics.ps.PSResource;
 import org.apache.xmlgraphics.ps.dsc.DSCException;
@@ -33,10 +36,8 @@
 import org.apache.xmlgraphics.ps.dsc.events.DSCCommentPages;
 import org.apache.xmlgraphics.ps.dsc.events.DSCCommentTitle;
 import org.apache.xmlgraphics.ps.dsc.events.DSCEvent;
+import org.junit.Test;
 
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.render.intermediate.IFContext;
-
 /**
  * Tests the image handling in PostScript output.
  */
@@ -46,6 +47,7 @@
      * Tests JPEG handling.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testJPEGImageLevel3() throws Exception {
         innerTestJPEGImage(3);
     }
@@ -54,6 +56,7 @@
      * Tests JPEG handling.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testJPEGImageLevel2() throws Exception {
         innerTestJPEGImage(2);
     }
Index: test/java/org/apache/fop/render/ps/AbstractPostScriptTestCase.java
===================================================================
--- test/java/org/apache/fop/render/ps/AbstractPostScriptTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/ps/AbstractPostScriptTestCase.java	(working copy)
@@ -19,9 +19,17 @@
 
 package org.apache.fop.render.ps;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.File;
 import java.io.IOException;
 
+import javax.xml.transform.TransformerFactory;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.FopFactory;
+import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.render.AbstractRenderingTestCase;
 import org.apache.xmlgraphics.ps.PSResource;
 import org.apache.xmlgraphics.ps.dsc.DSCException;
 import org.apache.xmlgraphics.ps.dsc.DSCParser;
@@ -29,15 +37,16 @@
 import org.apache.xmlgraphics.ps.dsc.events.DSCComment;
 import org.apache.xmlgraphics.ps.dsc.events.DSCEvent;
 
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.render.AbstractRenderingTestCase;
-
 /**
  * Abstract base class for PostScript verification tests.
  */
 public abstract class AbstractPostScriptTestCase extends AbstractRenderingTestCase {
 
+    /** the JAXP TransformerFactory */
+    protected TransformerFactory tFactory = TransformerFactory.newInstance();
+    /** the FopFactory */
+    protected FopFactory fopFactory = FopFactory.newInstance();
+
     /**
      * Renders a test file.
      * @param ua the user agent (with override set!)
Index: test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java
===================================================================
--- test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java	(working copy)
@@ -19,6 +19,11 @@
 
 package org.apache.fop.render.ps;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -27,7 +32,8 @@
 import java.util.Set;
 
 import org.apache.commons.io.IOUtils;
-
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.render.intermediate.IFContext;
 import org.apache.xmlgraphics.ps.DSCConstants;
 import org.apache.xmlgraphics.ps.PSResource;
 import org.apache.xmlgraphics.ps.dsc.DSCException;
@@ -43,10 +49,8 @@
 import org.apache.xmlgraphics.ps.dsc.events.DSCCommentIncludeResource;
 import org.apache.xmlgraphics.ps.dsc.events.DSCCommentPage;
 import org.apache.xmlgraphics.ps.dsc.events.DSCCommentPages;
+import org.junit.Test;
 
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.render.intermediate.IFContext;
-
 /**
  * Tests the PostScript resource optimization (selective de-duplication of
  * images that are used multiple times).
@@ -57,6 +61,7 @@
      * Tests resource optimization.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testResourceOptimization() throws Exception {
         FOUserAgent ua = fopFactory.newFOUserAgent();
         PSDocumentHandler handler = new PSDocumentHandler();
Index: test/java/org/apache/fop/render/ps/PSTestSuite.java
===================================================================
--- test/java/org/apache/fop/render/ps/PSTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/render/ps/PSTestSuite.java	(working copy)
@@ -19,25 +19,14 @@
 
 package org.apache.fop.render.ps;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for FOP's PostScript output.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ ImageHandlingTestCase.class, ResourceOptimizationTestCase.class })
 public class PSTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Test suite for PostScript output");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(ImageHandlingTestCase.class));
-        suite.addTest(new TestSuite(ResourceOptimizationTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/render/afp/AFPTestSuite.java
===================================================================
--- test/java/org/apache/fop/render/afp/AFPTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/render/afp/AFPTestSuite.java	(working copy)
@@ -19,24 +19,14 @@
 
 package org.apache.fop.render.afp;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for FOP's AFP output.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ NoOperationTestCase.class })
 public class AFPTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Test suite for AFP output");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(NoOperationTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/render/afp/NoOperationTestCase.java
===================================================================
--- test/java/org/apache/fop/render/afp/NoOperationTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/afp/NoOperationTestCase.java	(working copy)
@@ -19,19 +19,20 @@
 
 package org.apache.fop.render.afp;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
 
-import junit.framework.Assert;
-
 import org.apache.commons.io.IOUtils;
-
 import org.apache.fop.afp.AFPConstants;
 import org.apache.fop.afp.parser.MODCAParser;
 import org.apache.fop.afp.parser.UnparsedStructuredField;
 import org.apache.fop.apps.FOUserAgent;
+import org.junit.Test;
 
 /**
  * Tests generation of afp:no-operation (NOPs).
@@ -42,6 +43,7 @@
      * Tests afp:no-operation.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testNoOperation() throws Exception {
         FOUserAgent ua = fopFactory.newFOUserAgent();
         File outputFile = renderFile(ua, "nops.fo", "");
@@ -116,7 +118,7 @@
                 return field;
             }
         } while (field != null);
-        Assert.fail("Structured field not found: " + Integer.toHexString(typeID));
+        fail("Structured field not found: " + Integer.toHexString(typeID));
         return null;
     }
 
Index: test/java/org/apache/fop/render/pdf/PDFRendererConfiguratorTestCase.java
===================================================================
--- test/java/org/apache/fop/render/pdf/PDFRendererConfiguratorTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/pdf/PDFRendererConfiguratorTestCase.java	(working copy)
@@ -19,22 +19,24 @@
 
 package org.apache.fop.render.pdf;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.events.Event;
 import org.apache.fop.events.EventListener;
 import org.apache.fop.pdf.PDFEncryptionParams;
+import org.junit.Test;
 
 /**
  * Tests that encryption length is properly set up.
  */
-public class PDFRendererConfiguratorTestCase extends TestCase {
+public class PDFRendererConfiguratorTestCase {
 
     private FOUserAgent foUserAgent;
 
@@ -67,6 +69,7 @@
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testRoundUp() throws Exception {
         runTest("roundUp", 55, 56);
     }
@@ -76,6 +79,7 @@
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testRoundDown() throws Exception {
         runTest("roundDown", 67, 64);
     }
@@ -85,6 +89,7 @@
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testBelow40() throws Exception {
         runTest("below40", 32, 40);
     }
@@ -94,6 +99,7 @@
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testAbove128() throws Exception {
         runTest("above128", 233, 128);
     }
@@ -103,11 +109,12 @@
      *
      * @throws Exception if an error occurs
      */
+    @Test
     public void testCorrectValue() throws Exception {
         givenAConfigurationFile("correct", new EventListener() {
 
             public void processEvent(Event event) {
-                throw new AssertionFailedError("No event was expected");
+                fail("No event was expected");
             }
         });
         whenCreatingAndConfiguringDocumentHandler();
Index: test/java/org/apache/fop/render/pdf/BasePDFTestCase.java
===================================================================
--- test/java/org/apache/fop/render/pdf/BasePDFTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/pdf/BasePDFTestCase.java	(working copy)
@@ -28,16 +28,14 @@
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 
-import org.xml.sax.SAXException;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.output.ByteArrayOutputStream;
-
 import org.apache.fop.AbstractFOPTestCase;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
+import org.xml.sax.SAXException;
 
 /**
  * Base class for automated tests that create PDF files
@@ -52,10 +50,8 @@
 
     /**
      * Main constructor
-     * @param name the name of the test case
      */
-    protected BasePDFTestCase(String name) {
-        super(name);
+    protected BasePDFTestCase() {
         init();
     }
 
Index: test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java
===================================================================
--- test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java	(working copy)
@@ -19,10 +19,13 @@
 
 package org.apache.fop.render.pdf;
 
+import static org.junit.Assert.fail;
+
 import java.io.File;
 
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.pdf.PDFConformanceException;
+import org.junit.Test;
 
 /**
  * Tests PDF/A-1 functionality.
@@ -32,13 +35,6 @@
     private File foBaseDir = new File("test/xml/pdf-a");
     private boolean dumpPDF = Boolean.getBoolean("PDFAConformanceTestCase.dumpPDF");
 
-    /**
-     * Main constructor
-     * @param name the name of the test case
-     */
-    public PDFAConformanceTestCase(String name) {
-        super(name);
-    }
 
     /** create an FOUserAgent for our tests
      *  @return an initialized FOUserAgent
@@ -53,6 +49,7 @@
      * Test exception when PDF/A-1 is enabled and everything is as it should.
      * @throws Exception if the test fails
      */
+    @Test
     public void testAllOk() throws Exception {
         File foFile = new File(foBaseDir, "minimal-pdf-a.fo");
         convertFO(foFile, getUserAgent(), dumpPDF);
@@ -62,6 +59,7 @@
      * Test exception when PDF/A-1 is enabled together with encryption.
      * @throws Exception if the test fails
      */
+    @Test
     public void testNoEncryption() throws Exception {
         final FOUserAgent ua = getUserAgent();
         ua.getRendererOptions().put("owner-password", "mypassword"); //To enabled encryption
@@ -78,6 +76,7 @@
      * Test exception when PDF/A-1 is enabled and a font is used which is not embedded.
      * @throws Exception if the test fails
      */
+    @Test
     public void testFontNotEmbedded() throws Exception {
         File foFile = new File(foBaseDir, "base14-font.fo");
         try {
@@ -92,6 +91,7 @@
      * Test exception when PDF/A-1 is enabled and images.
      * @throws Exception if the test fails
      */
+    @Test
     public void testImages() throws Exception {
         File foFile = new File(foBaseDir, "with-rgb-images.fo");
         convertFO(foFile, getUserAgent(), dumpPDF);
Index: test/java/org/apache/fop/render/pdf/RenderPDFTestSuite.java
===================================================================
--- test/java/org/apache/fop/render/pdf/RenderPDFTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/render/pdf/RenderPDFTestSuite.java	(working copy)
@@ -19,27 +19,15 @@
 
 package org.apache.fop.render.pdf;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 
 /**
  * A test suite for org.apache.fop.render.pdf.*
  */
+@RunWith(Suite.class)
+@SuiteClasses({ PDFRendererConfiguratorTestCase.class })
 public final class RenderPDFTestSuite {
-
-    private RenderPDFTestSuite() { }
-
-    /**
-     * Creates the test suite.
-     *
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite();
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(PDFRendererConfiguratorTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java
===================================================================
--- test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java	(working copy)
@@ -19,9 +19,12 @@
 
 package org.apache.fop.render.pdf;
 
+import static org.junit.Assert.fail;
+
 import java.io.File;
 
 import org.apache.fop.apps.FOUserAgent;
+import org.junit.Test;
 
 /**
  * Tests the disables-srgb-colorspace setting.
@@ -30,14 +33,6 @@
 
     private File foBaseDir = new File("test/xml/pdf-a");
 
-    /**
-     * Main constructor
-     * @param name name of the test case
-     */
-    public PDFsRGBSettingsTestCase(String name) {
-        super(name);
-    }
-
     private FOUserAgent getUserAgent(boolean enablePDFA) {
         final FOUserAgent a = fopFactory.newFOUserAgent();
         if (enablePDFA) {
@@ -51,6 +46,7 @@
      * Verify that the PDFRenderer complains if PDF/A or PDF/X is used when sRGB is disabled.
      * @throws Exception if the test fails
      */
+    @Test
     public void testPDFAWithDisabledSRGB() throws Exception {
         File foFile = new File(foBaseDir, "minimal-pdf-a.fo");
         try {
Index: test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java
===================================================================
--- test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java	(working copy)
@@ -19,16 +19,18 @@
 
 package org.apache.fop.render.pdf;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.StringWriter;
 
-import junit.framework.TestCase;
-
 import org.apache.fop.pdf.CMapBuilder;
+import org.junit.Test;
 
 /** Simple sanity test of the PDFCmap class */
-public class PDFCMapTestCase extends TestCase {
+public class PDFCMapTestCase {
     private static final String EOL = "\n";
 
+    @Test
     public void testPDFCMapFillInPDF() throws Exception {
         final String expected
             = "%!PS-Adobe-3.0 Resource-CMap" + EOL
Index: test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java
===================================================================
--- test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java	(working copy)
@@ -19,6 +19,9 @@
 
 package org.apache.fop.render.pdf;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
 import java.util.Calendar;
 import java.util.TimeZone;
 
@@ -32,14 +35,14 @@
 import org.apache.xmlgraphics.xmp.schemas.XMPBasicSchema;
 import org.apache.xmlgraphics.xmp.schemas.pdf.AdobePDFAdapter;
 import org.apache.xmlgraphics.xmp.schemas.pdf.AdobePDFSchema;
+import org.junit.Test;
 
-import junit.framework.TestCase;
-
 /**
  * Test case for PDF/A metadata handling.
  */
-public class PDFAMetadataTestCase extends TestCase {
+public class PDFAMetadataTestCase {
 
+    @Test
     public void testInfoUpdate() throws Exception {
         Metadata meta = new Metadata();
         DublinCoreAdapter dc = DublinCoreSchema.getAdapter(meta);
@@ -76,6 +79,7 @@
         assertEquals(cal2.getTime(), info.getModDate());
     }
 
+    @Test
     public void testXMPUpdate() throws Exception {
         PDFDocument doc = new PDFDocument("SuperFOP");
         PDFInfo info = doc.getInfo();
Index: test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
===================================================================
--- test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java	(working copy)
@@ -19,11 +19,16 @@
 
 package org.apache.fop.render.pdf;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.StringTokenizer;
 
 import org.apache.fop.apps.FOUserAgent;
+import org.junit.Ignore;
+import org.junit.Test;
 
 /** Test that characters are correctly encoded in a generated PDF file */
 public class PDFEncodingTestCase extends BasePDFTestCase {
@@ -32,12 +37,6 @@
     static final String INPUT_FILE = "test/xml/pdf-encoding/pdf-encoding-test.xconf";
     static final String TEST_MARKER = "PDFE_TEST_MARK_";
 
-    /**
-     * @param name the name of the test case
-     */
-    public PDFEncodingTestCase(String name) {
-        super(name);
-    }
 
     /**
      * create an FOUserAgent for our tests
@@ -57,6 +56,7 @@
      * Test using a standard FOP font
      * @throws Exception checkstyle wants a comment here, even a silly one
      */
+    @Test
     public void testPDFEncodingWithStandardFont() throws Exception {
 
         /*  If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
@@ -82,7 +82,10 @@
      * @throws Exception
      *             checkstyle wants a comment here, even a silly one
      */
-    public void DISABLEDtestPDFEncodingWithCustomFont() throws Exception {
+    @Ignore("This should be tested using PDFBox. If PDFBox can extract the text correctly,"
+            + "everything is fine. The tests here are too unstable.")
+    @Test
+    public void testPDFEncodingWithCustomFont() throws Exception {
 
         /*  If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
          *     ...Tm [(PDFE_TEST_MARK_2:) ( ) (This) ( ) (is) ...(acute:) ( ) (XX_\351_XX) ] TJ
Index: test/java/org/apache/fop/render/rtf/Bug39607TestCase.java
===================================================================
--- test/java/org/apache/fop/render/rtf/Bug39607TestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/rtf/Bug39607TestCase.java	(working copy)
@@ -27,18 +27,18 @@
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfSection;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTable;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow;
+import org.junit.Test;
 
-import junit.framework.TestCase;
-
 /**
  * Test for http://issues.apache.org/bugzilla/show_bug.cgi?id=39607
  */
-public class Bug39607TestCase extends TestCase {
+public class Bug39607TestCase {
 
     /**
      * Test for the NPE describes in bug 39607
      * @throws Exception If an error occurs
      */
+    @Test
     public void testForNPE() throws Exception {
         StringWriter writer = new StringWriter();
         RtfFile f = new RtfFile(writer);
Index: test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java
===================================================================
--- test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java	(working copy)
@@ -19,24 +19,14 @@
 
 package org.apache.fop.render.rtf;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for FOP's RTF library.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ Bug39607TestCase.class })
 public class RichTextFormatTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Test suite for RTF library");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(Bug39607TestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/render/AbstractRenderingTestCase.java
===================================================================
--- test/java/org/apache/fop/render/AbstractRenderingTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/render/AbstractRenderingTestCase.java	(working copy)
@@ -31,11 +31,8 @@
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
-
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
@@ -44,7 +41,7 @@
 /**
  * Abstract base class for rendering (output) verification tests.
  */
-public abstract class AbstractRenderingTestCase extends TestCase {
+public abstract class AbstractRenderingTestCase {
 
     private static final Map<String, String> MIME_MAP = new java.util.HashMap<String, String>();
 
Index: test/java/org/apache/fop/render/RendererFactoryTest.java
===================================================================
--- test/java/org/apache/fop/render/RendererFactoryTest.java	(revision 1177642)
+++ test/java/org/apache/fop/render/RendererFactoryTest.java	(working copy)
@@ -19,10 +19,10 @@
 
 package org.apache.fop.render;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import org.apache.commons.io.output.NullOutputStream;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.FopFactory;
@@ -34,12 +34,14 @@
 import org.apache.fop.render.intermediate.IFRenderer;
 import org.apache.fop.render.pdf.PDFDocumentHandler;
 import org.apache.fop.render.rtf.RTFHandler;
+import org.junit.Test;
 
 /**
  * Tests for {@link RendererFactory}.
  */
-public class RendererFactoryTest extends TestCase {
+public class RendererFactoryTest {
 
+    @Test
     public void testDocumentHandlerLevel() throws Exception {
         FopFactory fopFactory = FopFactory.newInstance();
         RendererFactory factory = fopFactory.getRendererFactory();
@@ -67,6 +69,7 @@
         }
     }
 
+    @Test
     public void testRendererLevel() throws Exception {
         FopFactory fopFactory = FopFactory.newInstance();
         RendererFactory factory = fopFactory.getRendererFactory();
@@ -98,6 +101,7 @@
         }
     }
 
+    @Test
     public void testFOEventHandlerLevel() throws Exception {
         FopFactory fopFactory = FopFactory.newInstance();
         RendererFactory factory = fopFactory.getRendererFactory();
Index: test/java/org/apache/fop/BasicPSTranscoderTestCase.java
===================================================================
--- test/java/org/apache/fop/BasicPSTranscoderTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/BasicPSTranscoderTestCase.java	(working copy)
@@ -28,16 +28,7 @@
  */
 public class BasicPSTranscoderTestCase extends AbstractBasicTranscoderTestCase {
 
-    /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public BasicPSTranscoderTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.AbstractBasicTranscoderTestCase#createTranscoder()
-     */
+    @Override
     protected Transcoder createTranscoder() {
         return new PSTranscoder();
     }
Index: test/java/org/apache/fop/StandardTestSuite.java
===================================================================
--- test/java/org/apache/fop/StandardTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/StandardTestSuite.java	(working copy)
@@ -19,9 +19,6 @@
 
 package org.apache.fop;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.fop.afp.fonts.CharactersetEncoderTest;
 import org.apache.fop.afp.parser.MODCAParserTestCase;
 import org.apache.fop.area.ViewportTestSuite;
@@ -36,44 +33,25 @@
 import org.apache.fop.render.pdf.PDFCMapTestCase;
 import org.apache.fop.render.pdf.PDFEncodingTestCase;
 import org.apache.fop.render.pdf.PDFsRGBSettingsTestCase;
+import org.apache.fop.render.pdf.RenderPDFTestSuite;
 import org.apache.fop.render.ps.PSTestSuite;
 import org.apache.fop.render.rtf.RichTextFormatTestSuite;
 import org.apache.fop.traits.MinOptMaxTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for basic functionality of FOP.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ BasicDriverTestSuite.class, UtilityCodeTestSuite.class,
+        PDFAConformanceTestCase.class, PDFEncodingTestCase.class, PDFCMapTestCase.class,
+        PDFsRGBSettingsTestCase.class, DejaVuLGCSerifTest.class, RichTextFormatTestSuite.class,
+        ImageLoaderTestCase.class, ImagePreloaderTestCase.class, IFMimickingTestCase.class,
+        PageBoundariesTest.class, PageScaleTest.class, org.apache.fop.afp.AFPTestSuite.class,
+        GlyfTableTestCase.class, ViewportTestSuite.class, RenderPDFTestSuite.class,
+        MODCAParserTestCase.class, CharactersetEncoderTest.class,
+        org.apache.fop.render.afp.AFPTestSuite.class, PSTestSuite.class, MinOptMaxTest.class })
 public class StandardTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite("Basic functionality test suite for FOP");
-        //$JUnit-BEGIN$
-        suite.addTest(BasicDriverTestSuite.suite());
-        suite.addTest(UtilityCodeTestSuite.suite());
-        suite.addTest(org.apache.fop.afp.AFPTestSuite.suite());
-        suite.addTest(new TestSuite(PDFAConformanceTestCase.class));
-        suite.addTest(new TestSuite(PDFEncodingTestCase.class));
-        suite.addTest(new TestSuite(PDFCMapTestCase.class));
-        suite.addTest(new TestSuite(PDFsRGBSettingsTestCase.class));
-        suite.addTest(new TestSuite(DejaVuLGCSerifTest.class));
-        suite.addTest(new TestSuite(MODCAParserTestCase.class));
-        suite.addTest(new TestSuite(CharactersetEncoderTest.class));
-        suite.addTest(org.apache.fop.render.afp.AFPTestSuite.suite());
-        suite.addTest(PSTestSuite.suite());
-        suite.addTest(new TestSuite(GlyfTableTestCase.class));
-        suite.addTest(RichTextFormatTestSuite.suite());
-        suite.addTest(new TestSuite(ImageLoaderTestCase.class));
-        suite.addTest(new TestSuite(ImagePreloaderTestCase.class));
-        suite.addTest(new TestSuite(IFMimickingTestCase.class));
-        suite.addTest(new TestSuite(PageBoundariesTest.class));
-        suite.addTest(new TestSuite(PageScaleTest.class));
-        suite.addTest(new TestSuite(MinOptMaxTest.class));
-        suite.addTest(ViewportTestSuite.suite());
-        //$JUnit-END$
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/URIResolutionTestCase.java
===================================================================
--- test/java/org/apache/fop/URIResolutionTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/URIResolutionTestCase.java	(working copy)
@@ -19,6 +19,9 @@
 
 package org.apache.fop;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.OutputStream;
@@ -36,19 +39,19 @@
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
-import org.w3c.dom.Document;
-
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.xpath.XPathAPI;
-import org.apache.xpath.objects.XObject;
-
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.render.xml.XMLRenderer;
+import org.apache.xpath.XPathAPI;
+import org.apache.xpath.objects.XObject;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.w3c.dom.Document;
 
 /**
  * Tests URI resolution facilities.
@@ -61,11 +64,10 @@
     private SAXTransformerFactory tfactory
             = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
 
-    private File backupDir = new File(getBaseDir(), "build/test-results");
+    private final static File backupDir = new File(getBaseDir(), "build/test-results");
 
-    /** @see junit.framework.TestCase#TestCase(String) */
-    public URIResolutionTestCase(String name) {
-        super(name);
+    @BeforeClass
+    public static void makeDirs() {
         backupDir.mkdirs();
     }
 
@@ -73,6 +75,7 @@
      * Test custom URI resolution with a hand-written URIResolver.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO1a() throws Exception {
         innerTestFO1(false);
     }
@@ -81,6 +84,7 @@
      * Test custom URI resolution with a hand-written URIResolver.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO1b() throws Exception {
         innerTestFO1(true);
     }
@@ -112,7 +116,8 @@
      * Test custom URI resolution with a hand-written URIResolver.
      * @throws Exception if anything fails
      */
-    public void DISABLEDtestFO2() throws Exception {
+    @Test
+    public void testFO2() throws Exception {
         //TODO This will only work when we can do URI resolution inside Batik!
         File foFile = new File(getBaseDir(), "test/xml/uri-resolution2.fo");
 
Index: test/java/org/apache/fop/BasicTranscoderTestSuite.java
===================================================================
--- test/java/org/apache/fop/BasicTranscoderTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/BasicTranscoderTestSuite.java	(working copy)
@@ -19,25 +19,14 @@
 
 package org.apache.fop;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for basic functionality of FOP's transcoders.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ BasicPDFTranscoderTestCase.class, BasicPSTranscoderTestCase.class })
 public class BasicTranscoderTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Basic functionality test suite for FOP's transcoders");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(BasicPDFTranscoderTestCase.class));
-        suite.addTest(new TestSuite(BasicPSTranscoderTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/DigestFilterTestCase.java
===================================================================
--- test/java/org/apache/fop/DigestFilterTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/DigestFilterTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.IOException;
 import java.io.StringReader;
 import java.security.NoSuchAlgorithmException;
@@ -26,9 +28,9 @@
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParserFactory;
 
-import junit.framework.TestCase;
-
 import org.apache.fop.util.DigestFilter;
+import org.junit.Before;
+import org.junit.Test;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
@@ -37,12 +39,12 @@
  * Test case for digesting SAX filter.
  *
  */
-public class DigestFilterTestCase extends TestCase {
+public class DigestFilterTestCase {
 
     private SAXParserFactory parserFactory;
 
-    /** @see junit.framework.TestCase#setUp() */
-    protected void setUp() {
+    @Before
+    public void setUp() {
         parserFactory = SAXParserFactory.newInstance();
         parserFactory.setNamespaceAware(true);
     }
@@ -95,6 +97,7 @@
         return digestFilter.getDigestValue();
     }
 
+    @Test
     public final void testLineFeed()
         throws
             NoSuchAlgorithmException,
@@ -111,6 +114,7 @@
             compareDigest(lfDigest, crlfDigest));
     }
 
+    @Test
     public final void testAttributeOrder()
         throws
             NoSuchAlgorithmException,
@@ -134,6 +138,7 @@
             compareDigest(sortDigest, reverseDigest));
     }
 
+    @Test
     public final void testNamespacePrefix()
         throws
             NoSuchAlgorithmException,
Index: test/java/org/apache/fop/config/FOURIResolverTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FOURIResolverTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FOURIResolverTestCase.java	(working copy)
@@ -19,21 +19,23 @@
 
 package org.apache.fop.config;
 
+import static org.junit.Assert.fail;
+
 import java.net.MalformedURLException;
 
-import junit.framework.TestCase;
-
 import org.apache.fop.apps.FOURIResolver;
+import org.junit.Test;
 
 /**
  * This tests some aspects of the {@link FOURIResolver} class.
  */
-public class FOURIResolverTestCase extends TestCase {
+public class FOURIResolverTestCase {
 
     /**
      * Checks the {@link FOURIResolver#checkBaseURL(String)} method.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testCheckBaseURI() throws Exception {
         FOURIResolver resolver = new FOURIResolver(true);
         System.out.println(resolver.checkBaseURL("./test/config"));
Index: test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java	(working copy)
@@ -24,13 +24,7 @@
  */
 public class FontsDirectoryRecursiveTestCase extends BaseConstructiveUserConfigTestCase {
 
-    public FontsDirectoryRecursiveTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     protected String getUserConfigFilename() {
         return "test_fonts_directory_recursive.xconf";
     }
Index: test/java/org/apache/fop/config/FontAttributesMissingTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontAttributesMissingTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontAttributesMissingTestCase.java	(working copy)
@@ -19,18 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * this font is without a metrics-url or an embed-url
  */
 public class FontAttributesMissingTestCase extends BaseDestructiveUserConfigTestCase {
 
-    public FontAttributesMissingTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_attributes_missing.xconf";
     }
Index: test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java	(working copy)
@@ -19,18 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * this font has a malformed metrics-url
  */
 public class FontMetricsUrlMalformedTestCase extends BaseDestructiveUserConfigTestCase {
 
-    public FontMetricsUrlMalformedTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_metricsurl_malformed.xconf";
     }
Index: test/java/org/apache/fop/config/BaseConstructiveUserConfigTestCase.java
===================================================================
--- test/java/org/apache/fop/config/BaseConstructiveUserConfigTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/BaseConstructiveUserConfigTestCase.java	(working copy)
@@ -19,19 +19,20 @@
 
 package org.apache.fop.config;
 
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+
+/**
+ * Super class of several user config cases.
+ */
 public abstract class BaseConstructiveUserConfigTestCase extends BaseUserConfigTestCase {
 
     /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public BaseConstructiveUserConfigTestCase(String name) {
-        super(name);
-    }
-
-    /**
      * Test using a standard FOP font
      * @throws Exception checkstyle wants a comment here, even a silly one
      */
+    @Test
     public void testUserConfig() throws Exception {
         try {
             initConfig();
Index: test/java/org/apache/fop/config/FontBaseBadTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontBaseBadTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontBaseBadTestCase.java	(working copy)
@@ -19,16 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * This font base does not exist and a relative font path is used.
  */
 public class FontBaseBadTestCase extends BaseDestructiveUserConfigTestCase {
 
-    public FontBaseBadTestCase(String name) {
-        super(name);
-    }
-
-    /** {@inheritDoc} */
+    @Override
     public String getUserConfigFilename() {
         return "test_fontbase_bad.xconf";
     }
Index: test/java/org/apache/fop/config/FontsAutoDetectTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontsAutoDetectTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontsAutoDetectTestCase.java	(working copy)
@@ -21,13 +21,7 @@
 
 public class FontsAutoDetectTestCase extends BaseConstructiveUserConfigTestCase {
 
-    public FontsAutoDetectTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_fonts_autodetect.xconf";
     }
Index: test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java	(working copy)
@@ -24,13 +24,7 @@
  */
 public class FontEmbedUrlMalformedTestCase extends BaseDestructiveUserConfigTestCase {
 
-    public FontEmbedUrlMalformedTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_embedurl_malformed.xconf";
     }
Index: test/java/org/apache/fop/config/BaseDestructiveUserConfigTestCase.java
===================================================================
--- test/java/org/apache/fop/config/BaseDestructiveUserConfigTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/BaseDestructiveUserConfigTestCase.java	(working copy)
@@ -19,18 +19,21 @@
 
 package org.apache.fop.config;
 
+import static org.junit.Assert.fail;
+
 import org.apache.fop.apps.FOPException;
+import org.junit.Test;
 
+/**
+ * Super class for several user configuration failure cases.
+ */
 public abstract class BaseDestructiveUserConfigTestCase extends BaseUserConfigTestCase {
 
     /**
-     * @see junit.framework.TestCase#TestCase(String)
+     * Test the user configuration failure.
      */
-    public BaseDestructiveUserConfigTestCase(String name) {
-        super(name);
-    }
-
-    public void testUserConfig() throws Exception {
+    @Test
+    public void testUserConfig() {
         try {
             initConfig();
             convertFO();
Index: test/java/org/apache/fop/config/UserConfigTestSuite.java
===================================================================
--- test/java/org/apache/fop/config/UserConfigTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/config/UserConfigTestSuite.java	(working copy)
@@ -19,35 +19,18 @@
 
 package org.apache.fop.config;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for font configuration.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ FontBaseBadTestCase.class, FontAttributesMissingTestCase.class,
+        FontTripletAttributeMissingTestCase.class, FontMetricsUrlBadTestCase.class,
+        FontEmbedUrlBadTestCase.class, FontMetricsUrlMalformedTestCase.class,
+        FontMetricsUrlMalformedTestCase.class, FontsDirectoryRecursiveTestCase.class,
+        FontsAutoDetectTestCase.class, FontsSubstitutionTestCase.class, FOURIResolverTestCase.class })
 public class UserConfigTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Basic functionality test suite for user configuration");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(FontBaseBadTestCase.class));
-        suite.addTest(new TestSuite(FontAttributesMissingTestCase.class));
-        suite.addTest(new TestSuite(FontTripletAttributeMissingTestCase.class));
-        suite.addTest(new TestSuite(FontMetricsUrlBadTestCase.class));
-        suite.addTest(new TestSuite(FontEmbedUrlBadTestCase.class));
-        suite.addTest(new TestSuite(FontMetricsUrlMalformedTestCase.class));
-        suite.addTest(new TestSuite(FontEmbedUrlMalformedTestCase.class));
-        suite.addTest(new TestSuite(FontsDirectoryRecursiveTestCase.class));
-        suite.addTest(new TestSuite(FontsAutoDetectTestCase.class));
-        suite.addTest(new TestSuite(FontsSubstitutionTestCase.class));
-        suite.addTest(new TestSuite(FOURIResolverTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
-
 }
Index: test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java	(working copy)
@@ -19,23 +19,17 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * this font has a metrics-url that does not exist on filesystem
  */
 public class FontsDirectoryBadTestCase extends BaseDestructiveUserConfigTestCase {
 
-    public FontsDirectoryBadTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_fonts_directory_bad.xconf";
     }
 
-    /** get test FOP config File */
+    @Override
     protected String getFontFOFilePath() {
         return "test/xml/bugtests/font-dir.fo";
     }
Index: test/java/org/apache/fop/config/FontsSubstitutionTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontsSubstitutionTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontsSubstitutionTestCase.java	(working copy)
@@ -38,17 +38,7 @@
 public class FontsSubstitutionTestCase extends
         BaseConstructiveUserConfigTestCase {
 
-    /**
-     * Main constructor
-     * @param name test case name
-     */
-    public FontsSubstitutionTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     protected byte[] convertFO(File foFile, FOUserAgent ua, boolean dumpPdfFile)
             throws Exception {
         PrintRenderer renderer = (PrintRenderer) ua.getRendererFactory()
@@ -72,9 +62,7 @@
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_fonts_substitution.xconf";
     }
Index: test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java	(working copy)
@@ -19,21 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * this font has a metrics-url that does not exist on filesystem
  */
 public class FontMetricsUrlBadTestCase extends BaseDestructiveUserConfigTestCase {
 
-    /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public FontMetricsUrlBadTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_metricsurl_bad.xconf";
     }
Index: test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java	(working copy)
@@ -19,18 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * this font has a missing font triplet attribute
  */
 public class FontTripletAttributeMissingTestCase extends BaseDestructiveUserConfigTestCase {
 
-    public FontTripletAttributeMissingTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_tripletattribute_missing.xconf";
     }
Index: test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java
===================================================================
--- test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java	(working copy)
@@ -24,13 +24,7 @@
  */
 public class FontEmbedUrlBadTestCase extends BaseDestructiveUserConfigTestCase {
 
-    public FontEmbedUrlBadTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_embedurl_bad.xconf";
     }
Index: test/java/org/apache/fop/config/BaseUserConfigTestCase.java
===================================================================
--- test/java/org/apache/fop/config/BaseUserConfigTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/config/BaseUserConfigTestCase.java	(working copy)
@@ -23,16 +23,14 @@
 import java.io.File;
 import java.io.IOException;
 
-import org.xml.sax.SAXException;
-
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.render.pdf.BasePDFTestCase;
+import org.xml.sax.SAXException;
 
 /**
  * Basic runtime test for FOP's font configuration. It is used to verify that
@@ -47,13 +45,6 @@
 
 
     /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public BaseUserConfigTestCase(String name) {
-        super(name);
-    }
-
-    /**
      * @see org.apache.fop.render.pdf.BasePDFTestCase#init()
      */
     protected void init() {
@@ -102,8 +93,8 @@
      */
     protected abstract String getUserConfigFilename();
 
-    /*
-     * @see junit.framework.TestCase#getName()
+    /**
+     * The name of this test.
      */
     public String getName() {
         return getUserConfigFilename();
Index: test/java/org/apache/fop/traits/MinOptMaxTest.java
===================================================================
--- test/java/org/apache/fop/traits/MinOptMaxTest.java	(revision 1177642)
+++ test/java/org/apache/fop/traits/MinOptMaxTest.java	(working copy)
@@ -19,20 +19,27 @@
 
 package org.apache.fop.traits;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
+import org.junit.Test;
+
 /**
  * Tests the {@link MinOptMaxTest} class.
  */
-public class MinOptMaxTest extends TestCase {
+public class MinOptMaxTest {
 
     /**
      * Tests that the constant <code>MinOptMax.ZERO</code> is really zero.
      */
+    @Test
     public void testZero() {
         assertEquals(MinOptMax.getInstance(0), MinOptMax.ZERO);
     }
 
+    @Test
     public void testNewStiffMinOptMax() {
         MinOptMax value = MinOptMax.getInstance(1);
         assertTrue(value.isStiff());
@@ -41,6 +48,7 @@
         assertEquals(1, value.getMax());
     }
 
+    @Test
     public void testNewMinOptMax() {
         MinOptMax value = MinOptMax.getInstance(1, 2, 3);
         assertTrue(value.isElastic());
@@ -52,6 +60,7 @@
     /**
      * Test that it is possible to create stiff instances with the normal factory method.
      */
+    @Test
     public void testNewMinOptMaxStiff() {
         MinOptMax value = MinOptMax.getInstance(1, 1, 1);
         assertTrue(value.isStiff());
@@ -60,6 +69,7 @@
         assertEquals(1, value.getMax());
     }
 
+    @Test
     public void testNewMinOptMaxMinGreaterOpt() {
         try {
             MinOptMax.getInstance(1, 0, 2);
@@ -69,6 +79,7 @@
         }
     }
 
+    @Test
     public void testNewMinOptMaxMaxSmallerOpt() {
         try {
             MinOptMax.getInstance(0, 1, 0);
@@ -78,18 +89,21 @@
         }
     }
 
+    @Test
     public void testShrinkablility() {
         assertEquals(0, MinOptMax.getInstance(1).getShrink());
         assertEquals(1, MinOptMax.getInstance(1, 2, 2).getShrink());
         assertEquals(2, MinOptMax.getInstance(1, 3, 3).getShrink());
     }
 
+    @Test
     public void testStrechablilty() {
         assertEquals(0, MinOptMax.getInstance(1).getStretch());
         assertEquals(1, MinOptMax.getInstance(1, 1, 2).getStretch());
         assertEquals(2, MinOptMax.getInstance(1, 1, 3).getStretch());
     }
 
+    @Test
     public void testPlus() {
         assertEquals(MinOptMax.ZERO,
                 MinOptMax.ZERO.plus(MinOptMax.ZERO));
@@ -100,6 +114,7 @@
         assertEquals(MinOptMax.getInstance(4, 5, 6), MinOptMax.getInstance(1, 2, 3).plus(3));
     }
 
+    @Test
     public void testMinus() {
         assertEquals(MinOptMax.ZERO,
                 MinOptMax.ZERO.minus(MinOptMax.ZERO));
@@ -110,6 +125,7 @@
         assertEquals(MinOptMax.getInstance(1, 2, 3), MinOptMax.getInstance(5, 6, 7).minus(4));
     }
 
+    @Test
     public void testMinusFail1() {
         try {
             MinOptMax.ZERO.minus(MinOptMax.getInstance(1, 2, 3));
@@ -119,6 +135,7 @@
         }
     }
 
+    @Test
     public void testMinusFail2() {
         try {
             MinOptMax.getInstance(1, 2, 3).minus(MinOptMax.getInstance(1, 3, 3));
@@ -128,6 +145,7 @@
         }
     }
 
+    @Test
     public void testMinusFail3() {
         try {
             MinOptMax.ZERO.minus(MinOptMax.getInstance(1, 1, 2));
@@ -137,6 +155,7 @@
         }
     }
 
+    @Test
     public void testMinusFail4() {
         try {
             MinOptMax.getInstance(1, 2, 3).minus(MinOptMax.getInstance(1, 1, 3));
@@ -146,12 +165,14 @@
         }
     }
 
+    @Test
     public void testMult() {
         assertEquals(MinOptMax.ZERO, MinOptMax.ZERO.mult(0));
         assertEquals(MinOptMax.getInstance(1, 2, 3), MinOptMax.getInstance(1, 2, 3).mult(1));
         assertEquals(MinOptMax.getInstance(2, 4, 6), MinOptMax.getInstance(1, 2, 3).mult(2));
     }
 
+    @Test
     public void testMultFail() {
         try {
             MinOptMax.getInstance(1, 2, 3).mult(-1);
@@ -161,12 +182,14 @@
         }
     }
 
+    @Test
     public void testNonZero() {
         assertFalse(MinOptMax.ZERO.isNonZero());
         assertTrue(MinOptMax.getInstance(1).isNonZero());
         assertTrue(MinOptMax.getInstance(1, 2, 3).isNonZero());
     }
 
+    @Test
     public void testExtendMinimum() {
         assertEquals(MinOptMax.getInstance(1, 1, 1),
                 MinOptMax.ZERO.extendMinimum(1));
@@ -180,6 +203,7 @@
                 MinOptMax.getInstance(1, 2, 3).extendMinimum(4));
     }
 
+    @Test
     public void testEquals() {
         MinOptMax number = MinOptMax.getInstance(1, 3, 5);
         assertEquals(number, number);
@@ -191,6 +215,7 @@
         assertFalse(number.equals(new Integer(1)));
     }
 
+    @Test
     public void testHashCode() {
         MinOptMax number = MinOptMax.getInstance(1, 2, 3);
         assertEquals(number.hashCode(), number.hashCode());
Index: test/java/org/apache/fop/traits/BorderPropsTestCase.java
===================================================================
--- test/java/org/apache/fop/traits/BorderPropsTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/traits/BorderPropsTestCase.java	(working copy)
@@ -19,25 +19,27 @@
 
 package org.apache.fop.traits;
 
+import static org.junit.Assert.assertEquals;
+
 import java.awt.Color;
 
-import junit.framework.TestCase;
-
 import org.apache.xmlgraphics.java2d.color.ColorWithAlternatives;
 import org.apache.xmlgraphics.java2d.color.DeviceCMYKColorSpace;
 
 import org.apache.fop.fo.Constants;
 import org.apache.fop.util.ColorUtil;
+import org.junit.Test;
 
 /**
  * Tests the BorderProps class.
  */
-public class BorderPropsTestCase extends TestCase {
+public class BorderPropsTestCase {
 
     /**
      * Test serialization and deserialization to/from String.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testSerialization() throws Exception {
         Color col = new Color(1.0f, 1.0f, 0.5f, 1.0f);
         //Normalize: Avoid false alarms due to color conversion (rounding)
Index: test/java/org/apache/fop/afp/AFPTestSuite.java
===================================================================
--- test/java/org/apache/fop/afp/AFPTestSuite.java	(revision 1177642)
+++ test/java/org/apache/fop/afp/AFPTestSuite.java	(working copy)
@@ -19,27 +19,15 @@
 
 package org.apache.fop.afp;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.fop.afp.modca.AbstractStructuredObjectTestCase;
-import org.apache.fop.afp.modca.AbstractTripletStructuredObjectTestCase;
 import org.apache.fop.afp.modca.IncludeObjectTestCase;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for FOP's AFP classes.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ IncludeObjectTestCase.class, AFPResourceUtilTestCase.class })
 public class AFPTestSuite {
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite("Test suite for FOP's AFP classes");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(IncludeObjectTestCase.class));
-        suite.addTest(new TestSuite(AFPResourceUtilTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }
Index: test/java/org/apache/fop/afp/modca/AbstractTripletStructuredObjectTestCase.java
===================================================================
--- test/java/org/apache/fop/afp/modca/AbstractTripletStructuredObjectTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/afp/modca/AbstractTripletStructuredObjectTestCase.java	(working copy)
@@ -19,6 +19,10 @@
 
 package org.apache.fop.afp.modca;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -31,6 +35,7 @@
 import org.apache.fop.afp.modca.triplets.CommentTriplet;
 import org.apache.fop.afp.modca.triplets.ObjectAreaSizeTriplet;
 import org.apache.fop.afp.modca.triplets.Triplet;
+import org.junit.Before;
 
 /**
  * Test {@link AbstractTripletStructuredObject}
@@ -55,10 +60,8 @@
     private AbstractTripletStructuredObject emptyStructuredObject
             = new AbstractTripletStructuredObject() { };
 
-    @Override
+    @Before
     public void setUp() throws Exception {
-        super.setUp();
-
         AbstractTripletStructuredObject sut = getSut();
 
         for (AbstractTriplet triplet : TRIPLETS) {
Index: test/java/org/apache/fop/afp/modca/AbstractNamedAFPObjectTestCase.java
===================================================================
--- test/java/org/apache/fop/afp/modca/AbstractNamedAFPObjectTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/afp/modca/AbstractNamedAFPObjectTestCase.java	(working copy)
@@ -19,14 +19,18 @@
 
 package org.apache.fop.afp.modca;
 
+import static org.junit.Assert.assertTrue;
+
 import java.util.Arrays;
 
+import org.junit.Test;
+
 /**
  * Tests the {@linkplain AbstractAFPObject} class.
  */
 public abstract class AbstractNamedAFPObjectTestCase<S extends  AbstractNamedAFPObject>
         extends AbstractAFPObjectTestCase<S> {
-
+    @Test
     public void testCopySF() {
 
         final S sut = getSut();
Index: test/java/org/apache/fop/afp/modca/IncludeObjectTestCase.java
===================================================================
--- test/java/org/apache/fop/afp/modca/IncludeObjectTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/afp/modca/IncludeObjectTestCase.java	(working copy)
@@ -19,27 +19,31 @@
 
 package org.apache.fop.afp.modca;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.util.Arrays;
 
 import org.apache.fop.afp.util.BinaryUtils;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * Test {@link IncludeObject}
  */
 public class IncludeObjectTestCase extends AbstractNamedAFPObjectTestCase<IncludeObject> {
 
-    @Override
+    @Before
     public void setUp() throws Exception {
         setSut(new IncludeObject("8__chars"));
-        super.setUp();
     }
 
     /**
      * Test writeToStream()
      * @throws IOException -
      */
+    @Test
     public void testWriteToStream() throws IOException {
         final IncludeObject sut = getSut();
 
@@ -53,6 +57,7 @@
      * handed with a 180 x-axis
      * @throws IOException -
      */
+    @Test
     public void testWriteToStreamForOrientation() throws IOException {
         final IncludeObject sut = getSut();
 
Index: test/java/org/apache/fop/afp/modca/AbstractAFPObjectTestCase.java
===================================================================
--- test/java/org/apache/fop/afp/modca/AbstractAFPObjectTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/afp/modca/AbstractAFPObjectTestCase.java	(working copy)
@@ -19,6 +19,10 @@
 
 package org.apache.fop.afp.modca;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -26,15 +30,13 @@
 import java.util.Arrays;
 import java.util.List;
 
-import junit.framework.TestCase;
-
 import org.apache.fop.afp.Streamable;
+import org.junit.Test;
 
 /**
  * Tests the {@link AbstractAFPObject} class.
  */
-public abstract class  AbstractAFPObjectTestCase<S extends  AbstractAFPObject>
-        extends TestCase {
+public abstract class AbstractAFPObjectTestCase<S extends AbstractAFPObject> {
 
     private S sut;
 
@@ -61,7 +63,7 @@
             0x00 // Reserved
     };
 
-
+    @Test
     public void testCopySFStatic() {
         byte[] actual = new byte[9];
         Arrays.fill(actual, (byte)-1);
@@ -85,6 +87,7 @@
         assertTrue(Arrays.equals(actual, expected2));
     }
 
+    @Test
     public void testCopySF() {
         byte[] expected = new byte[9];
         S.copySF(expected, (byte) 0xD3, (byte)0, (byte)0);
@@ -112,6 +115,7 @@
     /**
      *
      */
+    @Test
     public void testwriteObjects() {
        final byte[][] expected = {{(byte)0, (byte)1}, {(byte)2, (byte)3}, {(byte)4, (byte)5}};
 
@@ -144,6 +148,7 @@
     /**
      *
      */
+    @Test
     public void testTruncate() {
         String expected = "abc";
         assertTrue(AbstractAFPObject.truncate(expected, 4)  == expected);
@@ -161,6 +166,7 @@
     /**
      *
      */
+    @Test
     public void testWriteChunksToStream() throws IOException {
         final byte[] data = new byte[256];
         int counter = 0;
Index: test/java/org/apache/fop/afp/AFPResourceUtilTestCase.java
===================================================================
--- test/java/org/apache/fop/afp/AFPResourceUtilTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/afp/AFPResourceUtilTestCase.java	(working copy)
@@ -19,20 +19,20 @@
 
 package org.apache.fop.afp;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 import java.util.Arrays;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.io.IOUtils;
-
 import org.apache.fop.afp.util.AFPResourceUtil;
+import org.junit.Test;
 
 /**
  * Tests the {@link AFPResourceUtil} class.
  */
-public class  AFPResourceUtilTestCase extends TestCase {
+public class AFPResourceUtilTestCase {
 
     private static final String RESOURCE_FILENAME = "expected_resource.afp";
 
@@ -44,6 +44,7 @@
      * Tests copyResourceFile()
      * @throws Exception -
      */
+    @Test
     public void testCopyResourceFile() throws Exception {
 
         final ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -74,6 +75,7 @@
      * Tests copyNamedResource()
      * @throws Exception -
      */
+    @Test
     public void testCopyNamedResource() throws Exception {
         final ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
Index: test/java/org/apache/fop/afp/fonts/CharactersetEncoderTest.java
===================================================================
--- test/java/org/apache/fop/afp/fonts/CharactersetEncoderTest.java	(revision 1177642)
+++ test/java/org/apache/fop/afp/fonts/CharactersetEncoderTest.java	(working copy)
@@ -19,19 +19,25 @@
 
 package org.apache.fop.afp.fonts;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.nio.charset.CharacterCodingException;
 
-import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * Test {@link CharactersetEncoder}
  */
-public class CharactersetEncoderTest extends TestCase {
+public class CharactersetEncoderTest {
     private CharactersetEncoder singlebyteEncoder;
     private CharactersetEncoder doublebyteEncoder;
 
+    @Before
     public void setUp() {
         singlebyteEncoder = CharactersetEncoder.newInstance("cp500", false);
         doublebyteEncoder = CharactersetEncoder.newInstance("cp937", true);
@@ -71,6 +77,7 @@
     /**
      * Tests canEncode() - tests that canEncode() responds properly to various input characters.
      */
+    @Test
     public void testCanEncode() {
         // Both SBCS and DBCS should support Latin characters
         for (char c = '!'; c < '~'; c++) {
@@ -86,6 +93,7 @@
         assertFalse(doublebyteEncoder.canEncode('\u00BB'));
     }
 
+    @Test
     public void testEncode() throws CharacterCodingException, IOException {
         CharactersetEncoder.EncodedChars encChars;// = doublebyteEncoder.encode(testCJKText);
         ByteArrayOutputStream bOut = new ByteArrayOutputStream();
Index: test/java/org/apache/fop/afp/parser/MODCAParserTestCase.java
===================================================================
--- test/java/org/apache/fop/afp/parser/MODCAParserTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/afp/parser/MODCAParserTestCase.java	(working copy)
@@ -19,18 +19,23 @@
 
 package org.apache.fop.afp.parser;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.EOFException;
 import java.io.InputStream;
 import java.util.Arrays;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 /**
  * MODCAParser and MODCAParser.UnparsedStructuredField Unit tests
  */
-public class MODCAParserTestCase extends TestCase {
+public class MODCAParserTestCase {
 
     /** The carriage control character (0x5A) used to indicate the start of a structured field. */
     public static final byte CARRIAGE_CONTROL_CHAR = (byte)0x5A;
@@ -47,6 +52,7 @@
      *
      * @throws Exception *
      */
+    @Test
     public void testReadNextStructuredField1() throws Exception {
 
         // carriage control (0x5A) delimits structured fields,
@@ -87,6 +93,7 @@
      *
      * @throws Exception *
      */
+    @Test
     public void testReadNextStructuredField2() throws Exception {
 
         // no extension data
Index: test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java
===================================================================
--- test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.InputStream;
 
@@ -26,6 +28,7 @@
 import org.apache.batik.transcoder.TranscoderInput;
 import org.apache.batik.transcoder.TranscoderOutput;
 import org.apache.commons.io.output.ByteArrayOutputStream;
+import org.junit.Test;
 
 /**
  * Basic runtime test for FOP's transcoders. It is used to verify that
@@ -34,13 +37,6 @@
 public abstract class AbstractBasicTranscoderTestCase extends AbstractFOPTestCase {
 
     /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public AbstractBasicTranscoderTestCase(String name) {
-        super(name);
-    }
-
-    /**
      * Creates the transcoder to test.
      * @return the newly instantiated transcoder
      */
@@ -51,6 +47,7 @@
      * Without special configuration stuff.
      * @throws Exception if a problem occurs
      */
+    @Test
     public void testGenericPDFTranscoder() throws Exception {
         //Create transcoder
         Transcoder transcoder = createTranscoder();
Index: test/java/org/apache/fop/pdf/FileIDGeneratorTestCase.java
===================================================================
--- test/java/org/apache/fop/pdf/FileIDGeneratorTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/pdf/FileIDGeneratorTestCase.java	(working copy)
@@ -19,41 +19,57 @@
 
 package org.apache.fop.pdf;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
 
 /**
  * Tests the {@link FileIDGenerator} class.
  */
-public abstract class FileIDGeneratorTestCase extends TestCase {
+@RunWith(Parameterized.class)
+public class FileIDGeneratorTestCase {
 
-    /**
-     * Returns a suite containing all the {@link FileIDGenerator} test cases.
-     *
-     * @return the test suite
-     */
-    public static final Test suite() {
-        TestSuite suite = new TestSuite(new Class[] {
-                RandomFileIDGeneratorTestCase.class,
-                DigestFileIDGeneratorTestCase.class },
-                FileIDGeneratorTestCase.class.getName());
-        return suite;
-    }
-
     /** The generator under test. */
     protected FileIDGenerator fileIDGenerator;
 
+    private TestInitializer initializer;
 
+    @Parameters
+    public static Collection<TestInitializer[]> getParameters() {
+        ArrayList<TestInitializer[]> params = new ArrayList<TestInitializer[]>();
+        params.add(new TestInitializer[] { new RandomFileIDGeneratorTest() });
+        params.add(new TestInitializer[] { new DigestFileIDGeneratorTest() });
+        return params;
+    }
+
+    public FileIDGeneratorTestCase(TestInitializer initializer) {
+        this.initializer = initializer;
+    }
+
+    @Before
+    public void setUp() throws Exception {
+        fileIDGenerator = initializer.getSut();
+    }
+
     /** Tests that the getOriginalFileID method generates valid output. */
+    @Test
     public void testOriginal() {
         byte[] fileID = fileIDGenerator.getOriginalFileID();
         fileIDMustBeValid(fileID);
     }
 
     /** Tests that the getUpdatedFileID method generates valid output. */
+    @Test
     public void testUpdated() {
         byte[] fileID = fileIDGenerator.getUpdatedFileID();
         fileIDMustBeValid(fileID);
@@ -65,6 +81,7 @@
     }
 
     /** Tests that multiple calls to getOriginalFileID method always return the same value. */
+    @Test
     public void testOriginalMultipleCalls() {
         byte[] fileID1 = fileIDGenerator.getUpdatedFileID();
         byte[] fileID2 = fileIDGenerator.getUpdatedFileID();
@@ -72,20 +89,23 @@
     }
 
     /** Tests that getUpdatedFileID returns the same value as getOriginalFileID. */
+    @Test
     public void testUpdateEqualsOriginal() {
         byte[] originalFileID = fileIDGenerator.getOriginalFileID();
         byte[] updatedFileID = fileIDGenerator.getUpdatedFileID();
         assertTrue(Arrays.equals(originalFileID, updatedFileID));
     }
 
+    private static interface TestInitializer {
+        FileIDGenerator getSut() throws Exception;
+    }
     /**
      * Tests the random file ID generator.
      */
-    public static class RandomFileIDGeneratorTestCase extends FileIDGeneratorTestCase {
+    private static class RandomFileIDGeneratorTest implements TestInitializer {
 
-        @Override
-        protected void setUp() throws Exception {
-            fileIDGenerator = FileIDGenerator.getRandomFileIDGenerator();
+        public FileIDGenerator getSut() throws Exception {
+            return FileIDGenerator.getRandomFileIDGenerator();
         }
 
     }
@@ -93,11 +113,10 @@
     /**
      * Tests the file ID generator based on an MD5 digest.
      */
-    public static class DigestFileIDGeneratorTestCase extends FileIDGeneratorTestCase {
+    private static class DigestFileIDGeneratorTest implements TestInitializer {
 
-        @Override
-        protected void setUp() throws Exception {
-            fileIDGenerator = FileIDGenerator.getDigestFileIDGenerator(
+        public FileIDGenerator getSut() throws Exception {
+            return FileIDGenerator.getDigestFileIDGenerator(
                     new PDFDocument("Apache FOP"));
         }
 
Index: test/java/org/apache/fop/pdf/PDFEncryptionJCETestCase.java
===================================================================
--- test/java/org/apache/fop/pdf/PDFEncryptionJCETestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/pdf/PDFEncryptionJCETestCase.java	(working copy)
@@ -19,6 +19,9 @@
 
 package org.apache.fop.pdf;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
@@ -26,12 +29,12 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 /**
  * Tests the {@link PDFEncryptionJCE} class.
  */
-public class PDFEncryptionJCETestCase extends TestCase {
+public class PDFEncryptionJCETestCase {
 
     private EncryptionTest test;
 
@@ -271,12 +274,14 @@
         }
     }
 
+    @Test
     public final void testMake() {
         PDFEncryption testEncryptionObj = createEncryptionObject(new PDFEncryptionParams());
         assertTrue(testEncryptionObj instanceof PDFEncryptionJCE);
         assertEquals(1, ((PDFEncryptionJCE) testEncryptionObj).getObjectNumber());
     }
 
+    @Test
     public void testBasic() throws IOException {
         test = new EncryptionTest();
         test.setData(0x00).setEncryptedData(0x56);
@@ -292,6 +297,7 @@
         runEncryptionTests();
     }
 
+    @Test
     public void test128bit() throws IOException {
         EncryptionDictionaryTester encryptionDictionaryTester = new EncryptionDictionaryTester()
                 .setVersion(2)
@@ -306,6 +312,7 @@
         runEncryptionTests();
     }
 
+    @Test
     public void testDisableRev2Permissions() throws IOException {
         EncryptionDictionaryTester encryptionDictionaryTester = new EncryptionDictionaryTester()
                 .setPermissions(-64)
@@ -320,6 +327,7 @@
         runEncryptionTests();
     }
 
+    @Test
     public void testDisableRev3Permissions() throws IOException {
         EncryptionDictionaryTester encryptionDictionaryTester = new EncryptionDictionaryTester()
                 .setVersion(2)
@@ -337,6 +345,7 @@
         runEncryptionTests();
     }
 
+    @Test
     public void test128bitDisableSomePermissions() throws IOException {
         EncryptionDictionaryTester encryptionDictionaryTester = new EncryptionDictionaryTester()
                 .setVersion(2)
@@ -355,6 +364,7 @@
         runEncryptionTests();
     }
 
+    @Test
     public void testDifferentPasswords() throws IOException {
         EncryptionDictionaryTester encryptionDictionaryTester = new EncryptionDictionaryTester()
                 .setOwnerEntry("D11C233C65E9DC872E858ABBD8B62198771167ADCE7AB8DC7AE0A1A7E21A1E25")
@@ -367,6 +377,7 @@
         runEncryptionTests();
     }
 
+    @Test
     public void testNoOwnerPassword() throws IOException {
         EncryptionDictionaryTester encryptionDictionaryTester = new EncryptionDictionaryTester()
                 .setOwnerEntry("5163AAF3EE74C76D7C223593A84C8702FEA8AA4493E4933FF5B5A5BBB20AE4BB")
@@ -379,6 +390,7 @@
         runEncryptionTests();
     }
 
+    @Test
     public void test128bitDisableSomePermissionsDifferentPasswords() throws IOException {
         EncryptionDictionaryTester encryptionDictionaryTester = new EncryptionDictionaryTester()
                 .setVersion(2)
@@ -399,6 +411,7 @@
         runEncryptionTests();
     }
 
+    @Test
     public void test128bitNoPermissionNoOwnerPassword() throws IOException {
         EncryptionDictionaryTester encryptionDictionaryTester = new EncryptionDictionaryTester()
                 .setVersion(2)
Index: test/java/org/apache/fop/pdf/PDFObjectTestCase.java
===================================================================
--- test/java/org/apache/fop/pdf/PDFObjectTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/pdf/PDFObjectTestCase.java	(working copy)
@@ -19,22 +19,25 @@
 
 package org.apache.fop.pdf;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.Calendar;
 import java.util.Date;
 import java.util.Locale;
 import java.util.TimeZone;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 /**
  * Tests the PDFObject class.
  */
-public class PDFObjectTestCase extends TestCase {
+public class PDFObjectTestCase {
 
     /**
      * Tests date/time formatting in PDFObject.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testDateFormatting() throws Exception {
         Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
         cal.set(2008, Calendar.FEBRUARY, 07, 15, 11, 07);
@@ -60,6 +63,7 @@
      * Tests PDF object references.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testReference() throws Exception {
         PDFDictionary dict = new PDFDictionary();
         dict.setObjectNumber(7);
Index: test/java/org/apache/fop/pdf/PDFFactoryTestCase.java
===================================================================
--- test/java/org/apache/fop/pdf/PDFFactoryTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/pdf/PDFFactoryTestCase.java	(working copy)
@@ -19,20 +19,22 @@
 
 package org.apache.fop.pdf;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
 
 import org.apache.fop.fonts.CIDSubset;
 import org.apache.fop.fonts.MultiByteFont;
+import org.junit.Test;
 
 /**
  * Test case for {@link PDFFactory}.
  */
-public class PDFFactoryTestCase extends TestCase {
+public class PDFFactoryTestCase {
 
     /**
      * This tests that when a font is subset embedded in a PDF, the font name is prefixed with a
      * pseudo-random tag as per the PDF spec.
      */
+    @Test
     public void testSubsetFontNamePrefix() {
         class MockedFont extends MultiByteFont {
             @Override
Index: test/java/org/apache/fop/BasicPDFTranscoderTestCase.java
===================================================================
--- test/java/org/apache/fop/BasicPDFTranscoderTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/BasicPDFTranscoderTestCase.java	(working copy)
@@ -28,16 +28,7 @@
  */
 public class BasicPDFTranscoderTestCase extends AbstractBasicTranscoderTestCase {
 
-    /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public BasicPDFTranscoderTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.AbstractBasicTranscoderTestCase#createTranscoder()
-     */
+    @Override
     protected Transcoder createTranscoder() {
         return new PDFTranscoder();
     }
Index: test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java
===================================================================
--- test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java	(working copy)
@@ -19,20 +19,21 @@
 
 package org.apache.fop.util;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.Map;
 
-import junit.framework.TestCase;
-
-import org.xml.sax.helpers.LocatorImpl;
-
 import org.apache.fop.events.model.EventSeverity;
 import org.apache.fop.util.text.AdvancedMessageFormat;
+import org.junit.Test;
+import org.xml.sax.helpers.LocatorImpl;
 
 /**
  * Tests for EventFormatter.
  */
-public class AdvancedMessageFormatTestCase extends TestCase {
+public class AdvancedMessageFormatTestCase {
 
+    @Test
     public void testFormatting() throws Exception {
         String msg;
         AdvancedMessageFormat format;
@@ -74,6 +75,7 @@
         assertEquals("Multi-conditional: case1: value1", msg);
     }
 
+    @Test
     public void testObjectFormatting() throws Exception {
         String msg;
         AdvancedMessageFormat format;
@@ -92,6 +94,7 @@
         assertEquals("Here\'s a Locator: 12:7", msg);
     }
 
+    @Test
     public void testIfFormatting() throws Exception {
         String msg;
         AdvancedMessageFormat format;
@@ -139,6 +142,7 @@
         assertEquals("You are very, very nice!", msg);
     }
 
+    @Test
     public void testEqualsFormatting() throws Exception {
         String msg;
         AdvancedMessageFormat format;
@@ -157,6 +161,7 @@
         assertEquals("Error\nSome explanation!", msg);
     }
 
+    @Test
     public void testChoiceFormatting() throws Exception {
         String msg;
         AdvancedMessageFormat format;
Index: test/java/org/apache/fop/util/ElementListUtilsTestCase.java
===================================================================
--- test/java/org/apache/fop/util/ElementListUtilsTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/util/ElementListUtilsTestCase.java	(working copy)
@@ -19,6 +19,9 @@
 
 package org.apache.fop.util;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
 import java.util.LinkedList;
 
 import org.apache.fop.layoutmgr.ElementListUtils;
@@ -26,18 +29,18 @@
 import org.apache.fop.layoutmgr.KnuthElement;
 import org.apache.fop.layoutmgr.KnuthGlue;
 import org.apache.fop.layoutmgr.KnuthPenalty;
+import org.junit.Test;
 
-import junit.framework.TestCase;
-
 /**
  * Test class for ElementListUtils.
  */
-public class ElementListUtilsTestCase extends TestCase {
+public class ElementListUtilsTestCase {
 
     /**
      * Tests ElementListUtils.removeLegalBreaks().
      * @throws Exception if the test fails
      */
+    @Test
     public void testRemoveElementPenalty1() throws Exception {
         LinkedList lst = new LinkedList();
         lst.add(new KnuthBox(4000, null, false));
@@ -64,6 +67,7 @@
      * Tests ElementListUtils.removeLegalBreaks().
      * @throws Exception if the test fails
      */
+    @Test
     public void testRemoveElementPenalty2() throws Exception {
         LinkedList lst = new LinkedList();
         lst.add(new KnuthBox(4000, null, false));
@@ -93,6 +97,7 @@
      * Tests ElementListUtils.removeLegalBreaksFromEnd().
      * @throws Exception if the test fails
      */
+    @Test
     public void testRemoveElementFromEndPenalty1() throws Exception {
         LinkedList lst = new LinkedList();
         lst.add(new KnuthBox(4000, null, false));
@@ -119,6 +124,7 @@
      * Tests ElementListUtils.removeLegalBreaksFromEnd().
      * @throws Exception if the test fails
      */
+    @Test
     public void testRemoveElementFromEndPenalty2() throws Exception {
         LinkedList lst = new LinkedList();
         lst.add(new KnuthBox(4000, null, false));
@@ -142,6 +148,4 @@
         assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getPenalty());
         assertEquals(0, ((KnuthGlue)lst.get(6)).getWidth());
     }
-
-
 }
\ No newline at end of file
Index: test/java/org/apache/fop/util/ColorUtilTestCase.java
===================================================================
--- test/java/org/apache/fop/util/ColorUtilTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/util/ColorUtilTestCase.java	(working copy)
@@ -19,29 +19,33 @@
 
 package org.apache.fop.util;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import java.awt.Color;
 import java.awt.color.ColorSpace;
 import java.net.URI;
 
-import junit.framework.TestCase;
-
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.FopFactory;
 import org.apache.xmlgraphics.java2d.color.ColorSpaces;
 import org.apache.xmlgraphics.java2d.color.ColorWithAlternatives;
 import org.apache.xmlgraphics.java2d.color.NamedColorSpace;
 import org.apache.xmlgraphics.java2d.color.RenderingIntent;
+import org.junit.Test;
 
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.FopFactory;
-
 /**
  * Tests the ColorUtil class.
  */
-public class ColorUtilTestCase extends TestCase {
+public class ColorUtilTestCase {
 
     /**
      * Test serialization to String.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testSerialization() throws Exception {
         Color col = new Color(1.0f, 1.0f, 0.5f, 1.0f);
         String s = ColorUtil.colorToString(col);
@@ -59,6 +63,7 @@
      * Test deserialization from String.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testDeserialization() throws Exception {
         Color col = ColorUtil.parseColorString(null, "#ffff7f");
         assertEquals(255, col.getRed());
@@ -77,6 +82,7 @@
      * Test equals().
      * @throws Exception if an error occurs
      */
+    @Test
     public void testEquals() throws Exception {
         Color col1 = ColorUtil.parseColorString(null, "#ff0000cc");
         Color col2 = ColorUtil.parseColorString(null, "#ff0000cc");
@@ -97,6 +103,7 @@
      * Tests the rgb() function.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testRGB() throws Exception {
         FopFactory fopFactory = FopFactory.newInstance();
         FOUserAgent ua = fopFactory.newFOUserAgent();
@@ -114,6 +121,7 @@
      * Tests the fop-rgb-icc() function.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testRGBICC() throws Exception {
         FopFactory fopFactory = FopFactory.newInstance();
         URI sRGBLoc = new URI(
@@ -162,6 +170,7 @@
      * Tests the cmyk() function.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testCMYK() throws Exception {
         ColorWithAlternatives colActual;
         String colSpec;
@@ -248,6 +257,7 @@
      * Tests color for the #Separation pseudo-colorspace.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testSeparationColor() throws Exception {
         ColorWithFallback colActual;
         String colSpec;
@@ -281,6 +291,7 @@
      * Tests the fop-rgb-named-color() function.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testNamedColorProfile() throws Exception {
         FopFactory fopFactory = FopFactory.newInstance();
         URI ncpLoc = new URI("file:test/resources/color/ncp-example.icc");
Index: test/java/org/apache/fop/util/BitmapImageUtilTestCase.java
===================================================================
--- test/java/org/apache/fop/util/BitmapImageUtilTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/util/BitmapImageUtilTestCase.java	(working copy)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.util;
 
+import static org.junit.Assert.assertEquals;
+
 import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.Graphics2D;
@@ -29,21 +31,18 @@
 import java.io.InputStream;
 import java.io.StringWriter;
 
-import junit.framework.TestCase;
-
 import org.apache.commons.io.IOUtils;
-
+import org.apache.fop.util.bitmap.BitmapImageUtil;
+import org.apache.fop.util.bitmap.MonochromeBitmapConverter;
 import org.apache.xmlgraphics.image.writer.ImageWriterUtil;
 import org.apache.xmlgraphics.util.WriterOutputStream;
 import org.apache.xmlgraphics.util.io.ASCIIHexOutputStream;
+import org.junit.Test;
 
-import org.apache.fop.util.bitmap.BitmapImageUtil;
-import org.apache.fop.util.bitmap.MonochromeBitmapConverter;
-
 /**
  * Tests {@link BitmapImageUtil}.
  */
-public class BitmapImageUtilTestCase extends TestCase {
+public class BitmapImageUtilTestCase {
 
     private static final boolean DEBUG = true;
     private static final boolean TEST_PIXELS = false;
@@ -52,6 +51,7 @@
      * Tests the convertTo* methods.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testConvertToMono() throws Exception {
         BufferedImage testImage = createTestImage();
         saveAsPNG(testImage, "test-image");
Index: test/java/org/apache/fop/util/XMLUtilTestCase.java
===================================================================
--- test/java/org/apache/fop/util/XMLUtilTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/util/XMLUtilTestCase.java	(working copy)
@@ -19,15 +19,19 @@
 
 package org.apache.fop.util;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
 import java.util.Locale;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 /**
  * Tests {@link XMLUtil}.
  */
-public class XMLUtilTestCase extends TestCase {
+public class XMLUtilTestCase {
 
+    @Test
     public void testLocaleToRFC3066() throws Exception {
         assertNull(XMLUtil.toRFC3066(null));
         assertEquals("en", XMLUtil.toRFC3066(new Locale("en")));
@@ -35,6 +39,7 @@
         assertEquals("en-US", XMLUtil.toRFC3066(new Locale("EN", "us")));
     }
 
+    @Test
     public void testRFC3066ToLocale() throws Exception {
         assertNull(XMLUtil.convertRFC3066ToLocale(null));
         assertNull(XMLUtil.convertRFC3066ToLocale(""));
Index: test/java/org/apache/fop/util/PDFNumberTestCase.java
===================================================================
--- test/java/org/apache/fop/util/PDFNumberTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/util/PDFNumberTestCase.java	(working copy)
@@ -19,19 +19,22 @@
 
 package org.apache.fop.util;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import org.apache.fop.pdf.PDFNumber;
+import org.junit.Test;
 
-import junit.framework.TestCase;
-
 /**
  * This test tests PDFNumber's doubleOut() methods.
  */
-public class PDFNumberTestCase extends TestCase {
+public class PDFNumberTestCase {
 
     /**
      * Tests PDFNumber.doubleOut().
      * @throws Exception if the test fails
      */
+    @Test
     public void testDoubleOut1() throws Exception {
         //Default is 6 decimal digits
         assertEquals("0", PDFNumber.doubleOut(0.0f));
@@ -51,6 +54,7 @@
      * Tests PDFNumber.doubleOut().
      * @throws Exception if the test fails
      */
+    @Test
     public void testDoubleOut2() throws Exception {
         //4 decimal digits in this case
         assertEquals("0", PDFNumber.doubleOut(0.0f, 4));
@@ -66,6 +70,7 @@
      * Tests PDFNumber.doubleOut().
      * @throws Exception if the test fails
      */
+    @Test
     public void testDoubleOut3() throws Exception {
         //0 decimal digits in this case
         assertEquals("0", PDFNumber.doubleOut(0.0f, 0));
@@ -79,6 +84,7 @@
      * Tests PDFNumber.doubleOut(). Special cases (former bugs).
      * @throws Exception if the test fails
      */
+    @Test
     public void testDoubleOut4() throws Exception {
         double d = Double.parseDouble("5.7220458984375E-6");
         assertEquals("0.000006", PDFNumber.doubleOut(d));
@@ -90,6 +96,7 @@
      * Tests PDFNumber.doubleOut(). Tests for wrong parameters.
      * @throws Exception if the test fails
      */
+    @Test
     public void testDoubleOutWrongParameters() throws Exception {
         try {
             PDFNumber.doubleOut(0.1f, -1);
Index: test/java/org/apache/fop/util/XMLResourceBundleTestCase.java
===================================================================
--- test/java/org/apache/fop/util/XMLResourceBundleTestCase.java	(revision 1177642)
+++ test/java/org/apache/fop/util/XMLResourceBundleTestCase.java	(working copy)
@@ -19,17 +19,21 @@
 
 package org.apache.fop.util;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import java.util.Locale;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 /**
  * Tests for XMLResourceBundle.
  */
-public class XMLResourceBundleTestCase extends TestCase {
+public class XMLResourceBundleTestCase {
 
+    @Test
     public void testWithValidFile() throws Exception {
         ResourceBundle bundle = XMLResourceBundle.getXMLBundle(
                 getClass().getName(), Locale.ENGLISH, getClass().getClassLoader());
@@ -47,6 +51,7 @@
         assertEquals("Untranslatable", bundleDE.getString("untranslatable"));
     }
 
+    @Test
     public void testWithInvalidFile() throws Exception {
         try {
             ResourceBundle bundle = XMLResourceBundle.getXMLBundle(
Index: build.xml
===================================================================
--- build.xml	(revision 1177642)
+++ build.xml	(working copy)
@@ -252,7 +252,7 @@
     <echo message="${jce.message}"/>
     <available property="jdk14.present" classname="java.lang.CharSequence"/>
     <fail message="${Name} requires at least Java 1.4!" unless="jdk14.present"/>
-    <available property="junit.present" classname="junit.framework.TestCase" classpathref="libs-tools-build-classpath"/>
+    <available property="junit.present" classname="org.junit.Test" classpathref="libs-tools-build-classpath"/>
     <condition property="junit.message" value="JUnit Support PRESENT">
       <equals arg1="${junit.present}" arg2="true"/>
     </condition>
