diff --git a/core/src/test/java/jenkins/util/xstream/XStreamDOMTest.java b/core/src/test/java/jenkins/util/xstream/XStreamDOMTest.java index 1774b803e0..0217e895b3 100644 --- a/core/src/test/java/jenkins/util/xstream/XStreamDOMTest.java +++ b/core/src/test/java/jenkins/util/xstream/XStreamDOMTest.java @@ -25,11 +25,13 @@ package jenkins.util.xstream; import hudson.util.XStream2; import org.apache.commons.io.IOUtils; +import org.hamcrest.core.IsInstanceOf; import org.junit.Before; import org.junit.Test; import org.xmlunit.diff.DefaultNodeMatcher; import org.xmlunit.diff.ElementSelectors; +import static org.hamcrest.Matchers.instanceOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.hamcrest.MatcherAssert.assertThat; @@ -141,7 +143,7 @@ public class XStreamDOMTest { v.values.put("foo",createSomeFoo().bar); String xml = xs.toXML(v); Object v2 = xs.fromXML(xml); - assertTrue(v2 instanceof DomInMap); + assertThat(v2, instanceOf(DomInMap.class)); assertXStreamDOMEquals(v.values.get("foo"), ((DomInMap)v2).values.get("foo")); }