X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fconfig-persister-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fpersist%2Fimpl%2Fosgi%2FTestingExceptionHandler.java;h=fcd39d6ae674df5320d0a5a429c3ab25b49e4613;hb=3927509ec3ecfa32a51b725d2b7155d425f5b877;hp=3f04010015e8291d8dbeb6e47415d6ab8a12ad3f;hpb=e2df8aa67238c153f1038eb45f7799442861985b;p=controller.git diff --git a/opendaylight/netconf/config-persister-impl/src/test/java/org/opendaylight/controller/netconf/persist/impl/osgi/TestingExceptionHandler.java b/opendaylight/netconf/config-persister-impl/src/test/java/org/opendaylight/controller/netconf/persist/impl/osgi/TestingExceptionHandler.java index 3f04010015..fcd39d6ae6 100644 --- a/opendaylight/netconf/config-persister-impl/src/test/java/org/opendaylight/controller/netconf/persist/impl/osgi/TestingExceptionHandler.java +++ b/opendaylight/netconf/config-persister-impl/src/test/java/org/opendaylight/controller/netconf/persist/impl/osgi/TestingExceptionHandler.java @@ -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 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)); } }