diff --git a/metafix/src/test/java/org/metafacture/metafix/ListFixPathsTest.java b/metafix/src/test/java/org/metafacture/metafix/ListFixPathsTest.java index 1fe53c9d..886abf88 100644 --- a/metafix/src/test/java/org/metafacture/metafix/ListFixPathsTest.java +++ b/metafix/src/test/java/org/metafacture/metafix/ListFixPathsTest.java @@ -19,11 +19,12 @@ import org.metafacture.framework.ObjectReceiver; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.MockitoAnnotations; import org.mockito.exceptions.base.MockitoAssertionError; +import org.mockito.junit.jupiter.MockitoExtension; /** * Tests for class {@link ListFixPaths}. @@ -31,16 +32,15 @@ * @author Fabian Steeg * */ +@ExtendWith(MockitoExtension.class) public final class ListFixPathsTest { - private ListFixPaths lister; + private final ListFixPaths lister = new ListFixPaths(); @Mock private ObjectReceiver receiver; public ListFixPathsTest() { - MockitoAnnotations.initMocks(this); - lister = new ListFixPaths(); } @Test diff --git a/metafix/src/test/java/org/metafacture/metafix/ListFixValuesTest.java b/metafix/src/test/java/org/metafacture/metafix/ListFixValuesTest.java index 97097d06..60f94fe8 100644 --- a/metafix/src/test/java/org/metafacture/metafix/ListFixValuesTest.java +++ b/metafix/src/test/java/org/metafacture/metafix/ListFixValuesTest.java @@ -19,11 +19,12 @@ import org.metafacture.framework.ObjectReceiver; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.MockitoAnnotations; import org.mockito.exceptions.base.MockitoAssertionError; +import org.mockito.junit.jupiter.MockitoExtension; /** * Tests for class {@link ListFixValues}. @@ -31,6 +32,7 @@ * @author Fabian Steeg * */ +@ExtendWith(MockitoExtension.class) public final class ListFixValuesTest { private ListFixValues lister; @@ -39,7 +41,6 @@ public final class ListFixValuesTest { private ObjectReceiver receiver; public ListFixValuesTest() { - MockitoAnnotations.initMocks(this); } @Test diff --git a/metafix/src/test/java/org/metafacture/metafix/MetafixLookupTest.java b/metafix/src/test/java/org/metafacture/metafix/MetafixLookupTest.java index 67b9fa54..f67a1b22 100644 --- a/metafix/src/test/java/org/metafacture/metafix/MetafixLookupTest.java +++ b/metafix/src/test/java/org/metafacture/metafix/MetafixLookupTest.java @@ -67,7 +67,7 @@ public MetafixLookupTest() { } @BeforeAll - private static void setStubForWireMock() { + public static void setStubForWireMock() { WIRE_MOCK_SERVER.start(); // stubs for RDF @@ -94,7 +94,7 @@ private static String loadFile(final String path) { } @AfterAll - private static void tearDownWireMock() { + public static void tearDownWireMock() { WIRE_MOCK_SERVER.stop(); }