diff --git a/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/AnalysisEngine_implTest.java b/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/AnalysisEngine_implTest.java
index 2529498da..9fddec776 100644
--- a/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/AnalysisEngine_implTest.java
+++ b/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/AnalysisEngine_implTest.java
@@ -104,9 +104,9 @@
import org.apache.uima.util.XMLSerializer;
import org.apache.uima.util.impl.ProcessTrace_impl;
import org.assertj.core.api.AutoCloseableSoftAssertions;
-import org.custommonkey.xmlunit.XMLAssert;
import org.junit.jupiter.api.Test;
import org.xml.sax.ContentHandler;
+import org.xmlunit.assertj3.XmlAssert;
/**
* Tests the TextAnalysisEngine_impl class.
@@ -1729,7 +1729,7 @@ private void manyDelegatesCommon() throws Exception {
String inXml = FileCompare.file2String(inFile);
String cloneXml = FileCompare.file2String(cloneFile);
- XMLAssert.assertXMLEqual(inXml, cloneXml);
+ XmlAssert.assertThat(cloneXml).and(inXml).areIdentical();
// When building from a source distribution the descriptor may not have
// appropriate line-ends so compute the length as if always 1 byte.
int diff = fileLength(cloneFile) - fileLength(inFile);
diff --git a/uimaj-core/src/test/java/org/apache/uima/util/CasToInlineXmlTest.java b/uimaj-core/src/test/java/org/apache/uima/util/CasToInlineXmlTest.java
index ccf8dfa48..73e8a90d6 100644
--- a/uimaj-core/src/test/java/org/apache/uima/util/CasToInlineXmlTest.java
+++ b/uimaj-core/src/test/java/org/apache/uima/util/CasToInlineXmlTest.java
@@ -38,9 +38,8 @@
import org.apache.uima.test.junit_extension.JUnitExtension;
import org.apache.uima.testTypeSystem_arrays.OfShorts;
import org.apache.uima.testTypeSystem_arrays.OfStrings;
-import org.custommonkey.xmlunit.XMLAssert;
-import org.custommonkey.xmlunit.XMLUnit;
import org.junit.jupiter.api.Test;
+import org.xmlunit.assertj3.XmlAssert;
public class CasToInlineXmlTest {
@@ -160,14 +159,8 @@ public void testCasToInlineXml() throws Exception {
break;
}
}
- boolean whitespaceFlag = XMLUnit.getIgnoreWhitespace();
- XMLUnit.setIgnoreWhitespace(true);
- try {
- XMLAssert.assertXMLEqual(expected, result);
- } finally {
- XMLUnit.setIgnoreWhitespace(whitespaceFlag);
- }
- // assertEquals(expected, result.trim());
+
+ XmlAssert.assertThat(result).and(expected).ignoreWhitespace().areIdentical();
}
private String canonicalizeNl(String s) {
diff --git a/uimaj-json/src/test/java/org/apache/uima/json/JsonCasSerializerTest.java b/uimaj-json/src/test/java/org/apache/uima/json/JsonCasSerializerTest.java
index f22892c91..95bf4c475 100644
--- a/uimaj-json/src/test/java/org/apache/uima/json/JsonCasSerializerTest.java
+++ b/uimaj-json/src/test/java/org/apache/uima/json/JsonCasSerializerTest.java
@@ -57,10 +57,10 @@
import org.apache.uima.util.XMLInputSource;
import org.apache.uima.util.XMLParser;
import org.apache.uima.util.XMLSerializer;
-import org.custommonkey.xmlunit.XMLAssert;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.xml.sax.SAXException;
+import org.xmlunit.assertj3.XmlAssert;
public class JsonCasSerializerTest {
// @formatter:off
@@ -584,7 +584,7 @@ private void compareWithExpected(String expectedResultsName, String r)
if (doJson) {
assertEquals(ce, r);
} else {
- XMLAssert.assertXMLEqual(ce, r);
+ XmlAssert.assertThat(r).and(ce).areIdentical();
}
}
diff --git a/uimaj-parent/pom.xml b/uimaj-parent/pom.xml
index 8ffe0425d..2331b13d8 100644
--- a/uimaj-parent/pom.xml
+++ b/uimaj-parent/pom.xml
@@ -141,6 +141,7 @@
2.13.1
5.8.2
3.22.0
+ 2.9.0
1.8
1.8
@@ -190,9 +191,14 @@
${slf4j-version}
- xmlunit
- xmlunit
- 1.6
+ org.xmlunit
+ xmlunit-core
+ ${xmlunit-version}
+
+
+ org.xmlunit
+ xmlunit-assertj3
+ ${xmlunit-version}
${eclipseP2RepoId}
diff --git a/uimaj-test-util/pom.xml b/uimaj-test-util/pom.xml
index 14bcb5e03..69c5c1b0a 100644
--- a/uimaj-test-util/pom.xml
+++ b/uimaj-test-util/pom.xml
@@ -51,8 +51,14 @@
compile
- xmlunit
- xmlunit
+ org.xmlunit
+ xmlunit-core
+ ${xmlunit-version}
+
+
+ org.xmlunit
+ xmlunit-assertj3
+ ${xmlunit-version}
\ No newline at end of file