From 3dbc637d3e8e8a5a8c775821998b1991e10690bc Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Thu, 17 Nov 2022 09:55:41 +0100 Subject: [PATCH] code formatting --- .../oa/dedup/SparkDedupPublicationTest.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/dhp-workflows/dhp-dedup-openaire/src/test/java/eu/dnetlib/dhp/oa/dedup/SparkDedupPublicationTest.java b/dhp-workflows/dhp-dedup-openaire/src/test/java/eu/dnetlib/dhp/oa/dedup/SparkDedupPublicationTest.java index c657d1865..773de65fa 100644 --- a/dhp-workflows/dhp-dedup-openaire/src/test/java/eu/dnetlib/dhp/oa/dedup/SparkDedupPublicationTest.java +++ b/dhp-workflows/dhp-dedup-openaire/src/test/java/eu/dnetlib/dhp/oa/dedup/SparkDedupPublicationTest.java @@ -15,7 +15,6 @@ import java.nio.file.Paths; import java.util.*; import java.util.stream.Collectors; -import com.fasterxml.jackson.core.JsonProcessingException; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.spark.SparkConf; @@ -32,6 +31,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Sets; @@ -299,17 +299,18 @@ public class SparkDedupPublicationTest implements Serializable { assertEquals("Article", instance_cr.get().getInstancetype().getClassname()); } - private void verifyRoot_case_2(Dataset roots, Dataset pubs) throws JsonProcessingException { + private void verifyRoot_case_2(Dataset roots, Dataset pubs) + throws JsonProcessingException { Publication root = roots .filter("id = '50|doi_dedup___::18aff3b55fb6876466a5d4bd82434885'") .first(); assertNotNull(root); Publication crossref_duplicate = pubs - .filter("id = '50|doi_________::18aff3b55fb6876466a5d4bd82434885'") - .first(); + .filter("id = '50|doi_________::18aff3b55fb6876466a5d4bd82434885'") + .first(); - //System.err.println(new ObjectMapper().writeValueAsString(root)); + // System.err.println(new ObjectMapper().writeValueAsString(root)); assertEquals(crossref_duplicate.getJournal().getName(), root.getJournal().getName()); assertEquals(crossref_duplicate.getJournal().getIssnOnline(), root.getJournal().getIssnOnline()); @@ -325,10 +326,10 @@ public class SparkDedupPublicationTest implements Serializable { .collect(Collectors.toCollection(HashSet::new)); Set root_cf = root - .getCollectedfrom() - .stream() - .map(KeyValue::getValue) - .collect(Collectors.toCollection(HashSet::new)); + .getCollectedfrom() + .stream() + .map(KeyValue::getValue) + .collect(Collectors.toCollection(HashSet::new)); assertTrue(Sets.difference(root_cf, dups_cf).isEmpty()); }