X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fconfig-netconf-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fconfignetconfconnector%2FNetconfMappingTest.java;h=5ed528e9bfe8c5144a5c96698bc234248d5fecac;hb=b8fa55473c0555d7418e9d1c5b313dd157b62392;hp=641881cf9ee50b71119c930a495ded9920575f73;hpb=c36bb2bc93ea0fbdd3ca8b2663447fc921450aee;p=controller.git diff --git a/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java b/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java index 641881cf9e..5ed528e9bf 100644 --- a/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java +++ b/opendaylight/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/NetconfMappingTest.java @@ -28,7 +28,6 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; - import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; @@ -43,22 +42,20 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; - import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.ObjectName; import javax.xml.parsers.ParserConfigurationException; - import org.custommonkey.xmlunit.AbstractNodeTester; import org.custommonkey.xmlunit.NodeTest; import org.custommonkey.xmlunit.NodeTestException; import org.custommonkey.xmlunit.NodeTester; import org.custommonkey.xmlunit.XMLAssert; import org.custommonkey.xmlunit.XMLUnit; +import org.hamcrest.CoreMatchers; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; -import org.junit.matchers.JUnitMatchers; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opendaylight.controller.config.api.ConflictingVersionException; @@ -121,7 +118,7 @@ import org.xml.sax.SAXException; public class NetconfMappingTest extends AbstractConfigTest { - private static final Logger logger = LoggerFactory.getLogger(NetconfMappingTest.class); + private static final Logger LOG = LoggerFactory.getLogger(NetconfMappingTest.class); private static final String INSTANCE_NAME = "instance-from-code"; private static final String NETCONF_SESSION_ID = "foo"; @@ -498,7 +495,7 @@ public class NetconfMappingTest extends AbstractConfigTest { for (int i = 0; i < TESTS_COUNT; i++) { String file = String.format(format, i + 1); - logger.info("Reading {}", file); + LOG.info("Reading {}", file); try { edit(file); } catch (NetconfDocumentedException e) { @@ -569,7 +566,7 @@ public class NetconfMappingTest extends AbstractConfigTest { } private void assertContainsString(String string, String substring) { - assertThat(string, JUnitMatchers.containsString(substring)); + assertThat(string, CoreMatchers.containsString(substring)); } private void checkEnum(final Document response) throws Exception { @@ -702,13 +699,13 @@ public class NetconfMappingTest extends AbstractConfigTest { final Document request = XmlFileLoader.xmlFileToDocument(filename); - logger.debug("Executing netconf operation\n{}", XmlUtil.toString(request)); + LOG.debug("Executing netconf operation\n{}", XmlUtil.toString(request)); HandlingPriority priority = op.canHandle(request); Preconditions.checkState(priority != HandlingPriority.CANNOT_HANDLE); final Document response = op.handle(request, NetconfOperationChainedExecution.EXECUTION_TERMINATION_POINT); - logger.debug("Got response\n{}", XmlUtil.toString(response)); + LOG.debug("Got response\n{}", XmlUtil.toString(response)); return response; }