X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fconfig-persister-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fpersist%2Fimpl%2Fosgi%2FTestingExceptionHandler.java;h=fcd39d6ae674df5320d0a5a429c3ab25b49e4613;hp=3f04010015e8291d8dbeb6e47415d6ab8a12ad3f;hb=071a641d7c12c0e6112d5ce0afe806b54f116ed2;hpb=c46e223995956f1f759c551163c212947c1e2fb7 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)); } }