From bfa5bc74dffada1b3e9963c5d72ce1f0eee6f8ff Mon Sep 17 00:00:00 2001 From: miconis Date: Wed, 1 Apr 2020 19:05:48 +0200 Subject: [PATCH] minor changes --- dhp-workflows/dhp-dedup-openaire/pom.xml | 6 ------ .../dhp/oa/dedup/dedup/SparkDedupTest.java | 21 +++++++------------ 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/dhp-workflows/dhp-dedup-openaire/pom.xml b/dhp-workflows/dhp-dedup-openaire/pom.xml index 6e3723ad8b..e7f2a926f4 100644 --- a/dhp-workflows/dhp-dedup-openaire/pom.xml +++ b/dhp-workflows/dhp-dedup-openaire/pom.xml @@ -90,12 +90,6 @@ com.fasterxml.jackson.core jackson-core - - junit - junit - 4.12 - test - diff --git a/dhp-workflows/dhp-dedup-openaire/src/test/java/eu/dnetlib/dhp/oa/dedup/dedup/SparkDedupTest.java b/dhp-workflows/dhp-dedup-openaire/src/test/java/eu/dnetlib/dhp/oa/dedup/dedup/SparkDedupTest.java index c0ddaa8423..2b5efbf4fe 100644 --- a/dhp-workflows/dhp-dedup-openaire/src/test/java/eu/dnetlib/dhp/oa/dedup/dedup/SparkDedupTest.java +++ b/dhp-workflows/dhp-dedup-openaire/src/test/java/eu/dnetlib/dhp/oa/dedup/dedup/SparkDedupTest.java @@ -3,30 +3,25 @@ package eu.dnetlib.dhp.oa.dedup.dedup; import com.google.common.collect.Lists; import com.google.common.hash.HashFunction; import com.google.common.hash.Hashing; -import eu.dnetlib.dhp.application.ArgumentApplicationParser; -import eu.dnetlib.dhp.oa.dedup.SparkCreateConnectedComponent; -import eu.dnetlib.dhp.oa.dedup.SparkCreateDedupRecord; import eu.dnetlib.dhp.oa.dedup.SparkCreateSimRels; import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpException; import eu.dnetlib.pace.config.DedupConfig; import org.apache.commons.io.IOUtils; import org.dom4j.DocumentException; -import org.junit.Before; -import org.junit.Test; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.when; +import org.mockito.junit.jupiter.MockitoExtension; import java.io.IOException; import java.util.List; -@RunWith(MockitoJUnitRunner.Silent.class) +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.when; + +@ExtendWith(MockitoExtension.class) public class SparkDedupTest { @Mock @@ -40,7 +35,7 @@ public class SparkDedupTest { ); } - @Before + @BeforeEach public void setUp() throws IOException, ISLookUpException, DocumentException { when(sparkCreateSimRels.getConfigurations(anyString(), anyString())).thenReturn(prepareConfigurations());