Update tests to Junit 4.

git-svn-id: https://svn.apache.org/repos/asf/webservices/commons/trunk/modules/XmlSchema@728300 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index cb53aeb..7e0d120 100644
--- a/pom.xml
+++ b/pom.xml
@@ -626,7 +626,7 @@
     <dependency>
       <groupId>xmlunit</groupId>
       <artifactId>xmlunit</artifactId>
-      <version>1.1</version>
+      <version>1.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/src/test/java/tests/AppInfoMarkupTest.java b/src/test/java/tests/AppInfoMarkupTest.java
index ed33f17..37e6035 100644
--- a/src/test/java/tests/AppInfoMarkupTest.java
+++ b/src/test/java/tests/AppInfoMarkupTest.java
@@ -32,12 +32,12 @@
 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 

-import org.custommonkey.xmlunit.XMLTestCase;

+import org.custommonkey.xmlunit.XMLAssert;

 import org.custommonkey.xmlunit.XMLUnit;

 

 import org.junit.Test;

 

-public class AppInfoMarkupTest extends XMLTestCase {

+public class AppInfoMarkupTest extends XMLAssert {

     @Test

     public void testAppInfo() throws Exception {

         DocumentBuilder b = DocumentBuilderFactory.newInstance().newDocumentBuilder();

diff --git a/src/test/java/tests/AttributeGroupTest.java b/src/test/java/tests/AttributeGroupTest.java
index f09663f..4034a86 100644
--- a/src/test/java/tests/AttributeGroupTest.java
+++ b/src/test/java/tests/AttributeGroupTest.java
@@ -26,8 +26,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaAttribute;
 import org.apache.ws.commons.schema.XmlSchemaAttributeGroup;
@@ -38,6 +36,9 @@
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 import org.apache.ws.commons.schema.XmlSchemaObjectTable;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 /*
  * Copyright 2004,2007 The Apache Software Foundation.
  * Copyright 2006 International Business Machines Corp.
@@ -55,13 +56,14 @@
  * limitations under the License.
  *
  */
-public class AttributeGroupTest extends TestCase {
+public class AttributeGroupTest extends Assert {
 
     /**
      * This method will test the list.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testAttributeGroup() throws Exception {
 
         /*
diff --git a/src/test/java/tests/AttributeRefTest.java b/src/test/java/tests/AttributeRefTest.java
index 44dd1ab..a2bb184 100644
--- a/src/test/java/tests/AttributeRefTest.java
+++ b/src/test/java/tests/AttributeRefTest.java
@@ -25,13 +25,14 @@
 import javax.xml.namespace.QName;

 import javax.xml.transform.stream.StreamSource;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaAttribute;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.XmlSchemaComplexType;

 

+import org.junit.Assert;

+import org.junit.Test;

+

 /*

  * Copyright 2004,2007 The Apache Software Foundation.

  * Copyright 2006 International Business Machines Corp.

@@ -49,8 +50,8 @@
  * limitations under the License.

  *

  */

-public class AttributeRefTest extends TestCase {

-

+public class AttributeRefTest extends Assert {

+    @Test

     public void testAttRefsWithNS() throws Exception {

         QName typeQName = new QName("http://tempuri.org/attribute", "TestAttributeReferenceType");

 

diff --git a/src/test/java/tests/BlockTest.java b/src/test/java/tests/BlockTest.java
index eac61c8..e58729e 100644
--- a/src/test/java/tests/BlockTest.java
+++ b/src/test/java/tests/BlockTest.java
@@ -25,13 +25,15 @@
 import javax.xml.namespace.QName;

 import javax.xml.transform.stream.StreamSource;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.XmlSchemaElement;

 

-public class BlockTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

+

+public class BlockTest extends Assert {

+    @Test

     public void testMixedContent() throws Exception {

         QName elementQName = new QName("http://soapinterop.org/xsd", "complexElt");

 

diff --git a/src/test/java/tests/ChoiceTest.java b/src/test/java/tests/ChoiceTest.java
index 6b9e4a7..98ff066 100644
--- a/src/test/java/tests/ChoiceTest.java
+++ b/src/test/java/tests/ChoiceTest.java
@@ -28,21 +28,23 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchemaChoice;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 
-public class ChoiceTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ChoiceTest extends Assert {
 
     /**
      * This method will test the choice.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testChoice() throws Exception {
 
         /*
diff --git a/src/test/java/tests/CircularSchemaTest.java b/src/test/java/tests/CircularSchemaTest.java
index 30e8374..7d68672 100644
--- a/src/test/java/tests/CircularSchemaTest.java
+++ b/src/test/java/tests/CircularSchemaTest.java
@@ -23,12 +23,14 @@
 
 import org.xml.sax.InputSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 
-public class CircularSchemaTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class CircularSchemaTest extends Assert {
+    @Test
     public void testCircular() throws Exception {
         XmlSchemaCollection schemas = new XmlSchemaCollection();
         File file = new File(Resources.asURI("circular/a.xsd"));
diff --git a/src/test/java/tests/ComplexContentRestrictionTest.java b/src/test/java/tests/ComplexContentRestrictionTest.java
index bb798ca..d8481b8 100644
--- a/src/test/java/tests/ComplexContentRestrictionTest.java
+++ b/src/test/java/tests/ComplexContentRestrictionTest.java
@@ -27,8 +27,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaComplexContentRestriction;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
@@ -37,13 +35,17 @@
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 import org.apache.ws.commons.schema.XmlSchemaSequence;
 
-public class ComplexContentRestrictionTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ComplexContentRestrictionTest extends Assert {
 
     /**
      * This method will test complex content restriction.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testComplexContentRestriction() throws Exception {
 
         /*
diff --git a/src/test/java/tests/ConstraintsTest.java b/src/test/java/tests/ConstraintsTest.java
index 32f06de..8dfe301 100644
--- a/src/test/java/tests/ConstraintsTest.java
+++ b/src/test/java/tests/ConstraintsTest.java
@@ -27,8 +27,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaKey;
@@ -37,13 +35,17 @@
 import org.apache.ws.commons.schema.XmlSchemaUnique;
 import org.apache.ws.commons.schema.XmlSchemaXPath;
 
-public class ConstraintsTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ConstraintsTest extends Assert {
 
     /**
      * This method will test the unique, key, and keyref constaints.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testConstraints() throws Exception {
 
         /*
diff --git a/src/test/java/tests/ElementRefs2Test.java b/src/test/java/tests/ElementRefs2Test.java
index 1099c1b..604b506 100644
--- a/src/test/java/tests/ElementRefs2Test.java
+++ b/src/test/java/tests/ElementRefs2Test.java
@@ -34,8 +34,6 @@
 import org.w3c.dom.Node;

 import org.w3c.dom.NodeList;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.XmlSchemaComplexType;

@@ -43,8 +41,11 @@
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;

 import org.apache.ws.commons.schema.XmlSchemaSequence;

 

-public class ElementRefs2Test extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

 

+public class ElementRefs2Test extends Assert {

+    @Test

     public void testElementRefs() throws Exception {

         QName elementQName = new QName("http://soapinterop.org/types", "attTests");

         InputStream is = new FileInputStream(Resources.asURI("elementreferences2.xsd"));

diff --git a/src/test/java/tests/ElementRefsTest.java b/src/test/java/tests/ElementRefsTest.java
index b4ce9c3..cb23603 100644
--- a/src/test/java/tests/ElementRefsTest.java
+++ b/src/test/java/tests/ElementRefsTest.java
@@ -27,8 +27,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
@@ -36,7 +34,11 @@
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 import org.apache.ws.commons.schema.XmlSchemaSequence;
 
-public class ElementRefsTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ElementRefsTest extends Assert {
+    @Test
     public void testElementRefs() throws Exception {
         QName elementQName = new QName("http://soapinterop.org/types", "attTests");
         InputStream is = new FileInputStream(Resources.asURI("elementreferences.xsd"));
diff --git a/src/test/java/tests/EncodingTest.java b/src/test/java/tests/EncodingTest.java
index 8e9fbab..fcd3c37 100644
--- a/src/test/java/tests/EncodingTest.java
+++ b/src/test/java/tests/EncodingTest.java
@@ -30,13 +30,14 @@
 

 import org.w3c.dom.Document;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 

-public class EncodingTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

 

+public class EncodingTest extends Assert {

+    @Test

     public void testExternalAtt() throws Exception {

         // create a DOM document

         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

diff --git a/src/test/java/tests/EnumValueTest.java b/src/test/java/tests/EnumValueTest.java
index dce7171..bcdc609 100644
--- a/src/test/java/tests/EnumValueTest.java
+++ b/src/test/java/tests/EnumValueTest.java
@@ -22,16 +22,17 @@
 
 import org.w3c.dom.Document;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 /**
  * Created by IntelliJ IDEA. User: ajith
  */
-public class EnumValueTest extends TestCase {
-
+public class EnumValueTest extends Assert {
+    @Test
     public void testValue() throws Exception {
         // create a DOM document
         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
diff --git a/src/test/java/tests/ExternalAttTest.java b/src/test/java/tests/ExternalAttTest.java
index b052df6..e974e6d 100644
--- a/src/test/java/tests/ExternalAttTest.java
+++ b/src/test/java/tests/ExternalAttTest.java
@@ -25,14 +25,15 @@
 

 import org.w3c.dom.Document;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.constants.Constants;

 

-public class ExternalAttTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

 

+public class ExternalAttTest extends Assert {

+    @Test

     public void testExternalAtt() throws Exception {

         // create a DOM document

         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

diff --git a/src/test/java/tests/FacetsTest.java b/src/test/java/tests/FacetsTest.java
index 27615fd..3e30b56 100644
--- a/src/test/java/tests/FacetsTest.java
+++ b/src/test/java/tests/FacetsTest.java
@@ -27,8 +27,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaEnumerationFacet;
@@ -47,13 +45,17 @@
 import org.apache.ws.commons.schema.XmlSchemaTotalDigitsFacet;
 import org.apache.ws.commons.schema.XmlSchemaWhiteSpaceFacet;
 
-public class FacetsTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class FacetsTest extends Assert {
 
     /**
      * This method will test for the length facet.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testLengthFacet() throws Exception {
 
         /*
@@ -117,6 +119,7 @@
      * 
      * @throws Exception Any Exception encountered
      */
+    @Test
     public void testPatternFacet() throws Exception {
 
         /*
@@ -172,6 +175,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testTotalDigitsFacet() throws Exception {
 
         /*
@@ -227,6 +231,7 @@
      * 
      * @throws Exception Any Exception encountered
      */
+    @Test
     public void testMinMaxInclusiveFacets() throws Exception {
 
         /*
@@ -291,6 +296,7 @@
      * 
      * @throws Exception Any Exception encountered
      */
+    @Test
     public void testMinMaxExlusiveFacets() throws Exception {
 
         /*
@@ -354,6 +360,7 @@
      * 
      * @throws Exception Any Exception encountered
      */
+    @Test
     public void testWhiteSpaceFacet() throws Exception {
 
         /*
@@ -409,6 +416,7 @@
      * 
      * @throws Exception Any Exception encountered
      */
+    @Test
     public void testFractionDigitsFacet() throws Exception {
 
         /*
@@ -472,6 +480,7 @@
      * 
      * @throws Exception Any Exception encountered
      */
+    @Test
     public void testMinMaxLengthFacets() throws Exception {
 
         /*
@@ -537,6 +546,7 @@
      * 
      * @throws Exception Any Exception encountered
      */
+    @Test
     public void testEnumerationFacet() throws Exception {
 
         /*
diff --git a/src/test/java/tests/GroupTest.java b/src/test/java/tests/GroupTest.java
index 08bf206..e884c60 100644
--- a/src/test/java/tests/GroupTest.java
+++ b/src/test/java/tests/GroupTest.java
@@ -28,8 +28,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaChoice;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
@@ -40,13 +38,17 @@
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 import org.apache.ws.commons.schema.XmlSchemaObjectTable;
 
-public class GroupTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class GroupTest extends Assert {
 
     /**
      * This method will test the group.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testGroup() throws Exception {
 
         /*
diff --git a/src/test/java/tests/ImportTest.java b/src/test/java/tests/ImportTest.java
index 2b38973..5fb4823 100644
--- a/src/test/java/tests/ImportTest.java
+++ b/src/test/java/tests/ImportTest.java
@@ -26,13 +26,14 @@
 

 import org.w3c.dom.Document;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 

-public class ImportTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

 

+public class ImportTest extends Assert {

+    @Test

     public void testSchemaImport() throws Exception {

         // create a DOM document

         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

@@ -56,6 +57,7 @@
      * 

      * @throws Exception

      */

+    @Test

     public void testSchemaImport2() throws Exception {

         File file = new File(Resources.asURI("importBase.xsd"));

         // create a DOM document

@@ -74,6 +76,7 @@
      * 

      * @throws Exception

      */

+    @Test

     public void testSchemaImport3() throws Exception {

         File file = new File(Resources.asURI("importBase.xsd"));

         // create a DOM document

diff --git a/src/test/java/tests/IncludeTest.java b/src/test/java/tests/IncludeTest.java
index 7cddf65..b813f83 100644
--- a/src/test/java/tests/IncludeTest.java
+++ b/src/test/java/tests/IncludeTest.java
@@ -29,21 +29,23 @@
 
 import org.xml.sax.InputSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaInclude;
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 
-public class IncludeTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class IncludeTest extends Assert {
 
     /**
      * This method will test the include.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testInclude() throws Exception {
 
         /*
@@ -99,6 +101,7 @@
     /**
      * Test importing a schema without namespace into a schema with namespace.
      */
+    @Test
     public void testImportSchemaWithoutNamespace() throws Exception {
         InputStream is = new FileInputStream(Resources.asURI("includingWithNamespace.xsd"));
         XmlSchemaCollection schemaCol = new XmlSchemaCollection();
@@ -110,6 +113,7 @@
     /**
      * Test importing a schema without namespace into a schema with namespace.
      */
+    @Test
     public void testIncludeSchemaWithoutNamespace() throws Exception {
         String uri = Resources.asURI("woden.xsd");
         InputSource is = new InputSource(new FileInputStream(uri));
@@ -132,6 +136,7 @@
      * 
      * @throws Exception
      */
+    @Test
     public void testSchemaInclude() throws Exception {
         String uri = Resources.asURI("WSCOMMONS-87/includeBase.xsd");
         InputSource isource = new InputSource(new FileInputStream(uri));
@@ -146,6 +151,7 @@
      * 
      * @throws Exception
      */
+    @Test
     public void testSchemaIncludeNoDefaultNS() throws Exception {
         String uri = Resources.asURI("WSCOMMONS-87/includeBaseNoDefaultNS.xsd");
         InputSource isource = new InputSource(new FileInputStream(uri));
diff --git a/src/test/java/tests/ListTest.java b/src/test/java/tests/ListTest.java
index d47f6e3..9506c8e 100644
--- a/src/test/java/tests/ListTest.java
+++ b/src/test/java/tests/ListTest.java
@@ -25,8 +25,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaSimpleType;
@@ -35,13 +33,17 @@
 import org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction;
 import org.apache.ws.commons.schema.XmlSchemaType;
 
-public class ListTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ListTest extends Assert {
 
     /**
      * This method will test the list.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testList() throws Exception {
 
         /*
diff --git a/src/test/java/tests/MixedContentTest.java b/src/test/java/tests/MixedContentTest.java
index fdfeb41..85803b6 100644
--- a/src/test/java/tests/MixedContentTest.java
+++ b/src/test/java/tests/MixedContentTest.java
@@ -25,8 +25,6 @@
 import javax.xml.namespace.QName;

 import javax.xml.transform.stream.StreamSource;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.XmlSchemaComplexContent;

@@ -34,7 +32,11 @@
 import org.apache.ws.commons.schema.XmlSchemaElement;

 import org.apache.ws.commons.schema.XmlSchemaType;

 

-public class MixedContentTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

+

+public class MixedContentTest extends Assert {

+    @Test

     public void testMixedContent() throws Exception {

         QName elementQName = new QName("http://soapinterop.org/xsd", "complexElt");

 

diff --git a/src/test/java/tests/MultipleExternalAttTest.java b/src/test/java/tests/MultipleExternalAttTest.java
index 98dd8e7..2a94726 100644
--- a/src/test/java/tests/MultipleExternalAttTest.java
+++ b/src/test/java/tests/MultipleExternalAttTest.java
@@ -25,14 +25,16 @@
 

 import org.w3c.dom.Document;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.constants.Constants;

 

-public class MultipleExternalAttTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

 

+public class MultipleExternalAttTest extends Assert {

+

+    @Test

     public void testExternalAtt() throws Exception {

         // create a DOM document

         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

diff --git a/src/test/java/tests/NamespaceContextTest.java b/src/test/java/tests/NamespaceContextTest.java
index e8bb24c..19411a1 100644
--- a/src/test/java/tests/NamespaceContextTest.java
+++ b/src/test/java/tests/NamespaceContextTest.java
@@ -30,22 +30,27 @@
 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.utils.NamespaceMap;

-

-import org.custommonkey.xmlunit.XMLTestCase;

+import org.custommonkey.xmlunit.XMLAssert;

 import org.custommonkey.xmlunit.XMLUnit;

 

-public class NamespaceContextTest extends XMLTestCase {

+import org.junit.After;

+import org.junit.Before;

+import org.junit.Test;

+

+public class NamespaceContextTest extends XMLAssert {

     protected boolean whitespace = true;

 

-    protected void setUp() throws Exception {

+    @Before

+    public void setUp() throws Exception {

         whitespace = XMLUnit.getIgnoreWhitespace();

         XMLUnit.setIgnoreWhitespace(true);

     }

-

-    protected void tearDown() throws java.lang.Exception {

+    @After

+    public void tearDown() throws java.lang.Exception {

         XMLUnit.setIgnoreWhitespace(whitespace);

     }

 

+    @Test

     public void testNamespaceContext() throws Exception {

         Map<String, Object> namespaceMapFromWSDL = new HashMap<String, Object>();

         namespaceMapFromWSDL.put("tns", new URI("http://example.org/getBalance/"));

diff --git a/src/test/java/tests/NotationTest.java b/src/test/java/tests/NotationTest.java
index b13b549..1f07b8f 100644
--- a/src/test/java/tests/NotationTest.java
+++ b/src/test/java/tests/NotationTest.java
@@ -31,8 +31,6 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaAnnotation;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
@@ -45,6 +43,9 @@
 import org.apache.ws.commons.schema.XmlSchemaSimpleType;
 import org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 /*
  * Copyright 2004,2007 The Apache Software Foundation.
  * Copyright 2006 International Business Machines Corp.
@@ -63,13 +64,14 @@
  * 
  * @author Brent Ulbricht 
  */
-public class NotationTest extends TestCase {
+public class NotationTest extends Assert {
 
     /**
      * This method will test the notation.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testNotation() throws Exception {
 
         /*
@@ -154,7 +156,7 @@
         assertTrue("The set should have been empty, but instead contained: " + s + ".", s.isEmpty());
 
     }
-
+    
     private void testSimpleRestrictions(QName elementQName, QName notationName, XmlSchemaCollection schemaCol,
                                   XmlSchema schema) {
         XmlSchemaObjectTable notations = schema.getNotations();
diff --git a/src/test/java/tests/RecursiveImportTest.java b/src/test/java/tests/RecursiveImportTest.java
index 86a060b..31d441c 100644
--- a/src/test/java/tests/RecursiveImportTest.java
+++ b/src/test/java/tests/RecursiveImportTest.java
@@ -24,13 +24,14 @@
 

 import org.w3c.dom.Document;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 

-public class RecursiveImportTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

 

+public class RecursiveImportTest extends Assert {

+    @Test

     public void testSchemaImport() throws Exception {

         // create a DOM document

         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

diff --git a/src/test/java/tests/RedefineTest.java b/src/test/java/tests/RedefineTest.java
index bd6883a..1b5944b 100644
--- a/src/test/java/tests/RedefineTest.java
+++ b/src/test/java/tests/RedefineTest.java
@@ -28,8 +28,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaAttribute;
 import org.apache.ws.commons.schema.XmlSchemaAttributeGroup;
@@ -49,13 +47,17 @@
 import org.apache.ws.commons.schema.XmlSchemaSimpleType;
 import org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction;
 
-public class RedefineTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class RedefineTest extends Assert {
 
     /**
      * This method will test a complex type redefine.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testComplexTypeRedefine() throws Exception {
 
         /*
@@ -131,6 +133,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testSimpleTypeRedefine() throws Exception {
         /*
          * redefine3.xsd ----------------- <schema xmlns="http://www.w3.org/2001/XMLSchema"
@@ -206,6 +209,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testGroupRedefine() throws Exception {
 
         /*
@@ -271,6 +275,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testAttributeGroupRedefine() throws Exception {
 
         /*
@@ -327,6 +332,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testComplexTypeRedefineWithRelativeImports() throws Exception {
 
         /*
diff --git a/src/test/java/tests/SequenceTest.java b/src/test/java/tests/SequenceTest.java
index 914f8f3..78f0bd9 100644
--- a/src/test/java/tests/SequenceTest.java
+++ b/src/test/java/tests/SequenceTest.java
@@ -25,20 +25,22 @@
 import javax.xml.namespace.QName;

 import javax.xml.transform.stream.StreamSource;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.XmlSchemaComplexType;

 import org.apache.ws.commons.schema.XmlSchemaElement;

 import org.apache.ws.commons.schema.XmlSchemaSequence;

 

-public class SequenceTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

+

+public class SequenceTest extends Assert {

 

     /**

      * This method will test the sequence - the min and max occurences.

      * 

      * @throws Exception Any exception encountered

      */

+    @Test

     public void testChoice() throws Exception {

 

         /*

diff --git a/src/test/java/tests/SimpleContentExtensionTest.java b/src/test/java/tests/SimpleContentExtensionTest.java
index bede094..98deccb 100644
--- a/src/test/java/tests/SimpleContentExtensionTest.java
+++ b/src/test/java/tests/SimpleContentExtensionTest.java
@@ -27,8 +27,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaAttribute;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
@@ -38,13 +36,17 @@
 import org.apache.ws.commons.schema.XmlSchemaSimpleContent;
 import org.apache.ws.commons.schema.XmlSchemaSimpleContentExtension;
 
-public class SimpleContentExtensionTest extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class SimpleContentExtensionTest extends Assert {
 
     /**
      * This method will test the simple content extension.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testSimpleContentExtension() throws Exception {
 
         /*
diff --git a/src/test/java/tests/SimpleContentRestrictionTest.java b/src/test/java/tests/SimpleContentRestrictionTest.java
index 236eefd..d1e517d 100644
--- a/src/test/java/tests/SimpleContentRestrictionTest.java
+++ b/src/test/java/tests/SimpleContentRestrictionTest.java
@@ -27,8 +27,6 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaAttribute;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
@@ -38,6 +36,9 @@
 import org.apache.ws.commons.schema.XmlSchemaSimpleContent;
 import org.apache.ws.commons.schema.XmlSchemaSimpleContentRestriction;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 /*
  * Copyright 2004,2007 The Apache Software Foundation.
  * Copyright 2006 International Business Machines Corp.
@@ -55,13 +56,14 @@
  * limitations under the License.
  *
  */
-public class SimpleContentRestrictionTest extends TestCase {
+public class SimpleContentRestrictionTest extends Assert {
 
     /**
      * This method will test the simple content restriction.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testSimpleContentRestriction() throws Exception {
 
         /*
diff --git a/src/test/java/tests/TestElementForm.java b/src/test/java/tests/TestElementForm.java
index 118b2ac..988b6b9 100644
--- a/src/test/java/tests/TestElementForm.java
+++ b/src/test/java/tests/TestElementForm.java
@@ -24,28 +24,32 @@
 import javax.xml.namespace.QName;

 import javax.xml.transform.stream.StreamSource;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.XmlSchemaComplexType;

 import org.apache.ws.commons.schema.XmlSchemaElement;

 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;

 import org.apache.ws.commons.schema.XmlSchemaSequence;

 

+import org.junit.Assert;

+import org.junit.Before;

+import org.junit.Test;

+

 /**

  * TestElementForm

  */

-public class TestElementForm extends TestCase {

+public class TestElementForm extends Assert {

     static final String NS = "http://unqualified-elements.example.com";

     static final QName UNQUAL = new QName(NS, "unQualifiedLocals");

     private XmlSchemaCollection schema;

 

-    protected void setUp() throws Exception {

+    @Before

+    public void setUp() throws Exception {

         InputStream is = new FileInputStream(Resources.asURI("elementForm.xsd"));

         schema = new XmlSchemaCollection();

         schema.read(new StreamSource(is), null);

     }

 

+    @Test

     public void testLocalElements() throws Exception {

         XmlSchemaElement element = schema.getElementByQName(UNQUAL);

         assertNotNull("Couldn't find unQualifiedLocals element", element);

diff --git a/src/test/java/tests/TestForwardRefs.java b/src/test/java/tests/TestForwardRefs.java
index ea8148e..feef9a3 100644
--- a/src/test/java/tests/TestForwardRefs.java
+++ b/src/test/java/tests/TestForwardRefs.java
@@ -25,18 +25,20 @@
 import javax.xml.namespace.QName;

 import javax.xml.transform.stream.StreamSource;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.XmlSchemaComplexType;

 import org.apache.ws.commons.schema.XmlSchemaElement;

 import org.apache.ws.commons.schema.XmlSchemaSequence;

 import org.apache.ws.commons.schema.XmlSchemaType;

 

+import org.junit.Assert;

+import org.junit.Test;

+

 /**

  */

-public class TestForwardRefs extends TestCase {

+public class TestForwardRefs extends Assert {

 

+    @Test

     public void testForwardRefs() throws Exception {

         QName elementQName = new QName("http://soapinterop.org/types", "attrTest");

         InputStream is = new FileInputStream(Resources.asURI("forwardRef.xsd"));

diff --git a/src/test/java/tests/TestLocalUnnamedSimpleType.java b/src/test/java/tests/TestLocalUnnamedSimpleType.java
index e2debe4..6949400 100644
--- a/src/test/java/tests/TestLocalUnnamedSimpleType.java
+++ b/src/test/java/tests/TestLocalUnnamedSimpleType.java
@@ -23,14 +23,15 @@
 

 import javax.xml.transform.stream.StreamSource;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 

+import org.junit.Assert;

+import org.junit.Test;

+

 /**

  * TestElementForm

  */

-public class TestLocalUnnamedSimpleType extends TestCase {

+public class TestLocalUnnamedSimpleType extends Assert {

     String schemaXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"

                        + "<schema xmlns=\"http://www.w3.org/2001/XMLSchema\"\n"

                        + "targetNamespace=\"http://finance.example.com/CreditCardFaults/xsd\"\n"

@@ -44,6 +45,7 @@
                        + "<enumeration value=\"MASTERCARD\" />\n" + "<enumeration value=\"VISA\" />\n"

                        + "</restriction>\n" + "</simpleType>\n" + "</element>\n" + "</schema> ";

 

+    @Test

     public void testLocalUnnamedSimpleType() throws Exception {

         XmlSchemaCollection schema = new XmlSchemaCollection();

         schema.read(new StreamSource(new ByteArrayInputStream(schemaXML.getBytes())), null);

diff --git a/src/test/java/tests/TestSimpleRestriction.java b/src/test/java/tests/TestSimpleRestriction.java
index 247a23d..941b421 100644
--- a/src/test/java/tests/TestSimpleRestriction.java
+++ b/src/test/java/tests/TestSimpleRestriction.java
@@ -24,15 +24,17 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaSimpleType;
 import org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction;
 import org.apache.ws.commons.schema.XmlSchemaType;
 
-public class TestSimpleRestriction extends TestCase {
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestSimpleRestriction extends Assert {
+    @Test
     public void testSimpleRestriction() throws Exception {
         QName typeQName = new QName("http://soapinterop.org/types", "layoutComponentType");
         QName elementQName = new QName("http://soapinterop.org/types", "foo");
@@ -51,6 +53,7 @@
         assertNotNull(type);
     }
 
+    @Test
     public void testSimpleTypeRestrictionWithoutNamespace() throws Exception {
         InputStream is = new FileInputStream(Resources.asURI("includedWithoutNamespace.xsd"));
         XmlSchemaCollection schema = new XmlSchemaCollection();
diff --git a/src/test/java/tests/TestUnqualifiedSchema.java b/src/test/java/tests/TestUnqualifiedSchema.java
index c482511..f860bf3 100644
--- a/src/test/java/tests/TestUnqualifiedSchema.java
+++ b/src/test/java/tests/TestUnqualifiedSchema.java
@@ -26,8 +26,6 @@
 

 import org.w3c.dom.Document;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchema;

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.XmlSchemaComplexType;

@@ -36,8 +34,12 @@
 import org.apache.ws.commons.schema.XmlSchemaSequence;

 import org.apache.ws.commons.schema.XmlSchemaType;

 

-public class TestUnqualifiedSchema extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

 

+public class TestUnqualifiedSchema extends Assert {

+

+    @Test

     public void testUnqualifiedSchemas() throws Exception {

         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

         documentBuilderFactory.setNamespaceAware(true);

@@ -58,7 +60,6 @@
         Iterator iterator = items.getIterator();

         while (iterator.hasNext()) {

             XmlSchemaElement elt2 = (XmlSchemaElement)iterator.next();

-            System.out.println(elt2.getQName());

             XmlSchemaType schemaType2 = elt2.getSchemaType();

 

             assertNotNull(schemaType2);

diff --git a/src/test/java/tests/TwoSchemasRefTest.java b/src/test/java/tests/TwoSchemasRefTest.java
index 25c62f1..a73159a 100644
--- a/src/test/java/tests/TwoSchemasRefTest.java
+++ b/src/test/java/tests/TwoSchemasRefTest.java
@@ -27,13 +27,15 @@
 import org.w3c.dom.Node;

 import org.w3c.dom.NodeList;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 import org.apache.ws.commons.schema.XmlSchemaElement;

 

-public class TwoSchemasRefTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

 

+public class TwoSchemasRefTest extends Assert {

+

+    @Test

     public void testTwoSchemas() throws Exception {

         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

         documentBuilderFactory.setNamespaceAware(true);

diff --git a/src/test/java/tests/TwoSchemasTest.java b/src/test/java/tests/TwoSchemasTest.java
index 5ec1745..0a043ef 100644
--- a/src/test/java/tests/TwoSchemasTest.java
+++ b/src/test/java/tests/TwoSchemasTest.java
@@ -27,12 +27,14 @@
 import org.w3c.dom.Node;

 import org.w3c.dom.NodeList;

 

-import junit.framework.TestCase;

-

 import org.apache.ws.commons.schema.XmlSchemaCollection;

 

-public class TwoSchemasTest extends TestCase {

+import org.junit.Assert;

+import org.junit.Test;

 

+public class TwoSchemasTest extends Assert {

+

+    @Test

     public void testTwoSchemas() throws Exception {

         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

         documentBuilderFactory.setNamespaceAware(true);

diff --git a/src/test/java/tests/UnionTest.java b/src/test/java/tests/UnionTest.java
index 9253bb4..c0899c9 100644
--- a/src/test/java/tests/UnionTest.java
+++ b/src/test/java/tests/UnionTest.java
@@ -27,21 +27,23 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.stream.StreamSource;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaSimpleType;
 import org.apache.ws.commons.schema.XmlSchemaSimpleTypeUnion;
 
+import org.junit.Assert;
+import org.junit.Test;
 
-public class UnionTest extends TestCase {
+
+public class UnionTest extends Assert {
 
     /**
      * This method will test the union.
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testUnion() throws Exception {
 
         /*
diff --git a/src/test/java/tests/WSCOMMONS377Test.java b/src/test/java/tests/WSCOMMONS377Test.java
index ad6f3ee..4f559d6 100755
--- a/src/test/java/tests/WSCOMMONS377Test.java
+++ b/src/test/java/tests/WSCOMMONS377Test.java
@@ -24,17 +24,18 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 
-import junit.framework.TestCase;
-
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.constants.Constants;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 /**
  * @author alex $Revision$
  */
-public class WSCOMMONS377Test extends TestCase {
-
+public class WSCOMMONS377Test extends Assert {
+    @Test
     public void testSchemaImport() throws Exception {
         DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
         fac.setNamespaceAware(true);