Migrate mdsal-common-api to JUnit5
[mdsal.git] / common / mdsal-common-api / src / test / java / org / opendaylight / mdsal / common / api / DataStoreUnavailableExceptionTest.java
index 1911a90716d0b880fc26c996c7cdd338b694dd40..88b0cfd28045b06aa0905877bad57d92dcab634c 100644 (file)
@@ -7,12 +7,16 @@
  */
 package org.opendaylight.mdsal.common.api;
 
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
-public class DataStoreUnavailableExceptionTest {
+import org.junit.jupiter.api.Test;
 
-    @Test(expected = DataStoreUnavailableException.class)
-    public void dataStoreUnavailableExceptionTest() throws Exception {
-        throw new DataStoreUnavailableException("test", null);
+class DataStoreUnavailableExceptionTest {
+    @Test
+    void dataStoreUnavailableExceptionTest() {
+        final var ex = new DataStoreUnavailableException("test", null);
+        assertEquals("test", ex.getMessage());
+        assertNull(ex.getCause());
     }
 }
\ No newline at end of file