Fix checkstyle warnings for config-persister-impl
[controller.git] / opendaylight / netconf / config-persister-impl / src / test / java / org / opendaylight / controller / netconf / persist / impl / osgi / TestingExceptionHandler.java
index 3f04010015e8291d8dbeb6e47415d6ab8a12ad3f..fcd39d6ae674df5320d0a5a429c3ab25b49e4613 100644 (file)
@@ -7,25 +7,25 @@
  */
 package org.opendaylight.controller.netconf.persist.impl.osgi;
 
+import static org.hamcrest.CoreMatchers.containsString;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
 
-import org.junit.matchers.JUnitMatchers;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 final class TestingExceptionHandler implements Thread.UncaughtExceptionHandler {
 
-    private static final Logger logger = LoggerFactory.getLogger(ConfigPersisterTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(TestingExceptionHandler.class);
 
     private Throwable t;
 
     @Override
     public void uncaughtException(Thread t, Throwable e) {
-        logger.debug("Uncaught exception in thread {}", t, e);
+        LOG.debug("Uncaught exception in thread {}", t, e);
         this.t = e;
     }
 
@@ -49,7 +49,7 @@ final class TestingExceptionHandler implements Thread.UncaughtExceptionHandler {
     private void assertException(Throwable t, Class<? extends Exception> exType, String exMessageToContain) {
         assertEquals("Expected exception of type " + exType + " but was " + t, exType, t.getClass());
         if(exMessageToContain!=null) {
-            assertThat(t.getMessage(), JUnitMatchers.containsString(exMessageToContain));
+            assertThat(t.getMessage(), containsString(exMessageToContain));
         }
     }