diff --git a/client/src/main/java/de/fraunhofer/iosb/client/policy/PolicyService.java b/client/src/main/java/de/fraunhofer/iosb/client/policy/PolicyService.java index 4c119cd7..22665f8e 100644 --- a/client/src/main/java/de/fraunhofer/iosb/client/policy/PolicyService.java +++ b/client/src/main/java/de/fraunhofer/iosb/client/policy/PolicyService.java @@ -15,33 +15,11 @@ */ package de.fraunhofer.iosb.client.policy; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ArrayNode; import de.fraunhofer.iosb.client.exception.AmbiguousOrNullException; import de.fraunhofer.iosb.client.util.Pair; import jakarta.json.Json; -import jakarta.json.JsonObject; -import static java.lang.String.format; -import static org.eclipse.edc.protocol.dsp.spi.types.HttpMessageProtocol.DATASPACE_PROTOCOL_HTTP; -import static org.eclipse.edc.spi.query.Criterion.criterion; - -import java.io.ByteArrayInputStream; -import java.net.URL; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.stream.Collectors; -import java.util.stream.Stream; - import org.eclipse.edc.catalog.spi.Catalog; -import org.eclipse.edc.catalog.spi.DataService; import org.eclipse.edc.catalog.spi.Dataset; -import org.eclipse.edc.catalog.spi.Distribution; import org.eclipse.edc.connector.spi.catalog.CatalogService; import org.eclipse.edc.jsonld.TitaniumJsonLd; import org.eclipse.edc.jsonld.spi.JsonLd; @@ -55,7 +33,6 @@ import org.eclipse.edc.transform.spi.TypeTransformerRegistry; import java.io.ByteArrayInputStream; -import java.io.IOException; import java.net.URL; import java.util.Collection; import java.util.List; @@ -68,16 +45,8 @@ import java.util.stream.Stream; import static java.lang.String.format; -import static org.eclipse.edc.jsonld.spi.Namespaces.*; -import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.DCAT_ACCESS_SERVICE_ATTRIBUTE; -import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.DCT_FORMAT_ATTRIBUTE; -import static org.eclipse.edc.policy.model.OdrlNamespace.ODRL_PREFIX; -import static org.eclipse.edc.policy.model.OdrlNamespace.ODRL_SCHEMA; import static org.eclipse.edc.protocol.dsp.spi.types.HttpMessageProtocol.DATASPACE_PROTOCOL_HTTP; import static org.eclipse.edc.spi.query.Criterion.criterion; -import de.fraunhofer.iosb.client.exception.AmbiguousOrNullException; -import de.fraunhofer.iosb.client.util.Pair; -import jakarta.json.Json; /** * Finds out policy for a given asset id and provider EDC url @@ -87,7 +56,7 @@ class PolicyService { private static final String CATALOG_RETRIEVAL_FAILURE_MSG = "Catalog by provider %s couldn't be retrieved: %s"; private final CatalogService catalogService; private final TypeTransformerRegistry transformer; - + private final PolicyServiceConfig config; private final PolicyDefinitionStore policyDefinitionStore; @@ -100,7 +69,7 @@ class PolicyService { * @param transformer Transform json-ld byte-array catalog to catalog class */ public PolicyService(CatalogService catalogService, TypeTransformerRegistry transformer, - PolicyServiceConfig config, PolicyDefinitionStore policyDefinitionStore, Monitor monitor) { + PolicyServiceConfig config, PolicyDefinitionStore policyDefinitionStore, Monitor monitor) { this.catalogService = catalogService; this.transformer = transformer; diff --git a/client/src/test/java/de/fraunhofer/iosb/client/dataTransfer/TransferInitiatorTest.java b/client/src/test/java/de/fraunhofer/iosb/client/dataTransfer/TransferInitiatorTest.java index 01c86d6a..b2776664 100644 --- a/client/src/test/java/de/fraunhofer/iosb/client/dataTransfer/TransferInitiatorTest.java +++ b/client/src/test/java/de/fraunhofer/iosb/client/dataTransfer/TransferInitiatorTest.java @@ -31,7 +31,6 @@ import java.util.UUID; import static org.junit.jupiter.api.Assertions.fail; -import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.*; public class TransferInitiatorTest { diff --git a/client/src/test/java/de/fraunhofer/iosb/client/negotiation/NegotiatorTest.java b/client/src/test/java/de/fraunhofer/iosb/client/negotiation/NegotiatorTest.java index 937b3592..d6107c49 100644 --- a/client/src/test/java/de/fraunhofer/iosb/client/negotiation/NegotiatorTest.java +++ b/client/src/test/java/de/fraunhofer/iosb/client/negotiation/NegotiatorTest.java @@ -49,7 +49,6 @@ public class NegotiatorTest { private final ConsumerContractNegotiationManager ccnmMock = mock(ConsumerContractNegotiationManager.class); private final ContractNegotiationStore cnsMock = mock(ContractNegotiationStore.class); private final ContractNegotiationObservable contractNegotiationObservable = new ContractNegotiationObservableImpl(); - private final Config configMock = ConfigFactory.empty(); private final String assetId = "test-asset-id"; private final Policy mockPolicy = buildPolicy();