X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2FNetconfUtilTest.java;h=47d0d4c7ccc56294d85e753f603e6c8bd951f2c0;hb=32715b020aca7945bc22476138f20ef7c78a3620;hp=85eeb30a07339c3b379bd756328f7ed96926fbc2;hpb=a7bc1dbcfefd7a349f4792242ea0f7a2ad072374;p=controller.git diff --git a/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/NetconfUtilTest.java b/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/NetconfUtilTest.java index 85eeb30a07..47d0d4c7cc 100644 --- a/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/NetconfUtilTest.java +++ b/opendaylight/netconf/netconf-util/src/test/java/org/opendaylight/controller/netconf/util/NetconfUtilTest.java @@ -7,22 +7,20 @@ */ package org.opendaylight.controller.netconf.util; +import static org.hamcrest.CoreMatchers.containsString; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; import org.junit.Test; -import org.opendaylight.controller.netconf.api.NetconfMessage; import org.opendaylight.controller.netconf.util.xml.XmlUtil; import org.w3c.dom.Document; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; -import static org.junit.matchers.JUnitMatchers.containsString; - public class NetconfUtilTest { @Test public void testConflictingVersionDetection() throws Exception { Document document = XmlUtil.readXmlToDocument(getClass().getResourceAsStream("/netconfMessages/conflictingversion/conflictingVersionResponse.xml")); try{ - NetconfUtil.checkIsMessageOk(new NetconfMessage(document)); + NetconfUtil.checkIsMessageOk(document); fail(); }catch(IllegalStateException e){ assertThat(e.getMessage(), containsString("Optimistic lock failed. Expected parent version 21, was 18"));