1616 */
1717package org .apache .logging .slf4j ;
1818
19+ import static org .hamcrest .MatcherAssert .assertThat ;
1920import static org .hamcrest .Matchers .hasItem ;
2021import static org .hamcrest .Matchers .hasSize ;
2122import static org .hamcrest .Matchers .is ;
2223import static org .hamcrest .Matchers .notNullValue ;
2324import static org .hamcrest .Matchers .theInstance ;
24- import static org .junit .Assert .assertEquals ;
25- import static org .junit .Assert .assertFalse ;
26- import static org .junit .Assert .assertNotNull ;
27- import static org .junit .Assert .assertNull ;
28- import static org .junit .Assert .assertThat ;
29- import static org .junit .Assert .assertTrue ;
30- import static org .junit .Assert .fail ;
25+ import static org .junit .jupiter .api .Assertions .assertEquals ;
26+ import static org .junit .jupiter .api .Assertions .assertFalse ;
27+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
28+ import static org .junit .jupiter .api .Assertions .assertNull ;
29+ import static org .junit .jupiter .api .Assertions .assertTrue ;
30+ import static org .junit .jupiter .api .Assertions .fail ;
3131
3232import ch .qos .logback .classic .LoggerContext ;
3333import ch .qos .logback .classic .spi .ILoggingEvent ;
@@ -213,7 +213,7 @@ public void testImpliedThrowable() {
213213 final List <String > msgs = list .strList ;
214214 assertThat (msgs , hasSize (1 ));
215215 final String expected = "java.lang.Throwable: Testing" ;
216- assertTrue ("Incorrect message data" , msgs .get (0 ).contains (expected ));
216+ assertTrue (msgs .get (0 ).contains (expected ), "Incorrect message data" );
217217 }
218218
219219 @ SuppressWarnings ("unchecked" )
@@ -224,32 +224,32 @@ public void mdc() {
224224 ThreadContext .clearMap ();
225225 logger .debug ("Debug message" );
226226 assertThat (list .strList , hasSize (2 ));
227- assertTrue ("Incorrect year" , list .strList .get (0 ).startsWith ("2010" ));
227+ assertTrue (list .strList .get (0 ).startsWith ("2010" ), "Incorrect year" );
228228 }
229229
230230 @ Test
231231 public void mdcNullBackedIsEmpty () {
232- assertNull ("Setup wrong" , MDC .getCopyOfContextMap ());
232+ assertNull (MDC .getCopyOfContextMap (), "Setup wrong" );
233233 assertTrue (ThreadContext .isEmpty ());
234234 }
235235
236236 @ Test
237237 public void mdcNullBackedContainsKey () {
238- assertNull ("Setup wrong" , MDC .getCopyOfContextMap ());
238+ assertNull (MDC .getCopyOfContextMap (), "Setup wrong" );
239239 assertFalse (ThreadContext .containsKey ("something" ));
240240 }
241241
242242 @ Test
243243 public void mdcNullBackedContainsNullKey () {
244- assertNull ("Setup wrong" , MDC .getCopyOfContextMap ());
244+ assertNull (MDC .getCopyOfContextMap (), "Setup wrong" );
245245 assertFalse (ThreadContext .containsKey (null ));
246246 }
247247
248248 @ Test
249249 public void mdcContainsNullKey () {
250250 try {
251251 ThreadContext .put ("some" , "thing" );
252- assertNotNull ("Setup wrong" , MDC .getCopyOfContextMap ());
252+ assertNotNull (MDC .getCopyOfContextMap (), "Setup wrong" );
253253 assertFalse (ThreadContext .containsKey (null ));
254254 } finally {
255255 ThreadContext .clearMap ();
0 commit comments