summaryrefslogtreecommitdiffstats
path: root/aai-schema-ingest
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-11-07 08:35:37 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-11-07 08:38:19 +0000
commitfbb02159b84435cf37221ae8ae5e0045167be15a (patch)
tree78196f6a3e5e4d0b1e5ca6ecadec0f9e9a623303 /aai-schema-ingest
parent58f0fd2f6ef58de52e1f9a73540c1bb895c0d6e6 (diff)
Reduce the number of problems in aai-common by removing unused imports
- run mvn spotless:apply across aai-commmon to remove unused imports - run mvn formatter:format across aai-common Issue-ID: AAI-3583 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I2dfeb395eafa2824ce8369bba3a18db3e1845522
Diffstat (limited to 'aai-schema-ingest')
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java5
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java4
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java6
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java17
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java4
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java3
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java8
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java8
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java8
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java1
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java5
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorLocalTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java8
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorLocalTest.java41
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java47
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockProvider.java1
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java8
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java1
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java1
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorRainyDayTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java3
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorRainyDayTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSchemaIncompleteTest.java2
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java2
31 files changed, 84 insertions, 123 deletions
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java b/aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java
index 2e6847d2..c4f951a3 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java
@@ -22,9 +22,6 @@
package org.onap.aai.config;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -32,6 +29,8 @@ import java.util.Set;
import org.onap.aai.nodes.NodeIngestor;
import org.onap.aai.setup.Translator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java
index 207f7e0a..c3222168 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java
@@ -23,8 +23,6 @@ package org.onap.aai.edges;
import static com.jayway.jsonpath.Criteria.where;
import static com.jayway.jsonpath.Filter.filter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
@@ -51,6 +49,8 @@ import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException;
import org.onap.aai.setup.SchemaVersion;
import org.onap.aai.setup.SchemaVersions;
import org.onap.aai.setup.Translator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java
index 8861c5cc..40761372 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java
@@ -20,12 +20,12 @@
package org.onap.aai.edges;
-import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.onap.aai.edges.enums.*;
-
import java.util.EnumMap;
import java.util.Map;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.onap.aai.edges.enums.*;
+
/**
* Container for A&AI edge rule information
*/
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java
index 893ebad5..f7a2b9a7 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java
@@ -22,6 +22,10 @@
package org.onap.aai.edges;
+import com.jayway.jsonpath.Criteria;
+import com.jayway.jsonpath.Filter;
+import com.jayway.jsonpath.Predicate;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -34,10 +38,6 @@ import org.onap.aai.edges.enums.EdgeProperty;
import org.onap.aai.edges.enums.EdgeType;
import org.onap.aai.setup.SchemaVersion;
-import com.jayway.jsonpath.Criteria;
-import com.jayway.jsonpath.Filter;
-import com.jayway.jsonpath.Predicate;
-
/**
* For querying the edge rules schema (not the database)
*
@@ -57,7 +57,6 @@ public class EdgeRuleQuery {
public static class Builder {
-
// required
private String nodeA;
@@ -244,9 +243,11 @@ public class EdgeRuleQuery {
private Predicate addDirection(AAIDirection direction) {
if (direction == AAIDirection.OUT) {
- return Criteria.where(EdgeField.DIRECTION.toString()).in(AAIDirection.OUT.toString(), AAIDirection.BOTH.toString());
+ return Criteria.where(EdgeField.DIRECTION.toString()).in(AAIDirection.OUT.toString(),
+ AAIDirection.BOTH.toString());
} else if (direction == AAIDirection.IN) {
- return Criteria.where(EdgeField.DIRECTION.toString()).in(AAIDirection.IN.toString(), AAIDirection.BOTH.toString());
+ return Criteria.where(EdgeField.DIRECTION.toString()).in(AAIDirection.IN.toString(),
+ AAIDirection.BOTH.toString());
} else if (direction == AAIDirection.BOTH) {
return Criteria.where(EdgeField.DIRECTION.toString()).is(AAIDirection.BOTH.toString());
} else if (direction == AAIDirection.NONE) {
@@ -333,7 +334,7 @@ public class EdgeRuleQuery {
@Override
public int hashCode() {
return v.map(schemaVersion -> Objects.hash(schemaVersion, nodeA, nodeB, label, direction, type, isPrivate))
- .orElseGet(() -> Objects.hash(nodeA, nodeB, label, direction, type, isPrivate));
+ .orElseGet(() -> Objects.hash(nodeA, nodeB, label, direction, type, isPrivate));
}
}
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java b/aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java
index 9b1f0bd9..ec0e850b 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java
@@ -20,8 +20,6 @@
package org.onap.aai.edges;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.JsonPath;
@@ -35,6 +33,8 @@ import java.util.Map;
import java.util.Map.Entry;
import org.onap.aai.setup.SchemaVersion;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* JsonIngestor produces DocumentContexts from json files
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java b/aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java
index 014a4442..a3d477ee 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java
@@ -23,6 +23,7 @@
package org.onap.aai.nodes;
import com.google.common.base.CaseFormat;
+
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -34,12 +35,14 @@ import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
import javax.annotation.PostConstruct;
import javax.xml.XMLConstants;
import javax.xml.bind.JAXBException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+
import org.eclipse.persistence.jaxb.JAXBContextProperties;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java
index a92005ea..e764dda6 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java
@@ -20,6 +20,10 @@
package org.onap.aai.restclient;
+import java.util.Collections;
+import java.util.Map;
+import java.util.UUID;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
@@ -27,10 +31,6 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.util.MultiValueMap;
-import java.util.Collections;
-import java.util.Map;
-import java.util.UUID;
-
public class SchemaServiceNoAuthClient extends NoAuthRestClient {
private static Logger logger = LoggerFactory.getLogger(SchemaServiceNoAuthClient.class);
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java
index 1ab0999e..1f04bff1 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java
@@ -20,6 +20,10 @@
package org.onap.aai.restclient;
+import java.util.Collections;
+import java.util.Map;
+import java.util.UUID;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
@@ -27,10 +31,6 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.util.MultiValueMap;
-import java.util.Collections;
-import java.util.Map;
-import java.util.UUID;
-
public class SchemaServiceOneWayClient extends OneWaySSLRestClient {
private static Logger logger = LoggerFactory.getLogger(SchemaServiceOneWayClient.class);
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java
index 62f4b68b..f7bdf6d7 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java
@@ -22,6 +22,10 @@
package org.onap.aai.restclient;
+import java.util.Collections;
+import java.util.Map;
+import java.util.UUID;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
@@ -29,10 +33,6 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.util.MultiValueMap;
-import java.util.Collections;
-import java.util.Map;
-import java.util.UUID;
-
public class SchemaServiceRestClient extends TwoWaySSLRestClient {
private static Logger logger = LoggerFactory.getLogger(SchemaServiceRestClient.class);
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java
index 10f1f542..27148a44 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java
@@ -26,6 +26,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+
import org.onap.aai.restclient.RestClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java
index 0094a161..1d140ea6 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java
@@ -21,14 +21,9 @@
package org.onap.aai.setup;
import java.util.List;
-import java.util.stream.Collectors;
-
-import javax.annotation.PostConstruct;
import org.onap.aai.validation.AAISchemaValidationException;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
-import org.springframework.stereotype.Component;
@PropertySource(value = "classpath:schema-ingest.properties", ignoreResourceNotFound = true)
@PropertySource(value = "file:${schema.ingest.file}", ignoreResourceNotFound = true)
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java b/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java
index 39efde54..3d415e62 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java
@@ -23,8 +23,6 @@ package org.onap.aai.setup;
import java.io.*;
import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-
/**
* Converts the contents of the schema config file
* (which lists which schema files to be loaded) to
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorLocalTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorLocalTest.java
index e3826576..6f896f88 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorLocalTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorLocalTest.java
@@ -36,8 +36,6 @@ import org.onap.aai.edges.enums.AAIDirection;
import org.onap.aai.edges.enums.MultiplicityRule;
import org.onap.aai.edges.exceptions.AmbiguousRuleChoiceException;
import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException;
-import org.onap.aai.restclient.MockProvider;
-import org.onap.aai.setup.SchemaLocationsBean;
import org.onap.aai.setup.SchemaVersion;
import org.onap.aai.testutils.TestUtilConfigTranslator;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java
index a9cd1f74..99693c16 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java
@@ -27,7 +27,6 @@ import com.google.common.collect.Multimap;
import java.util.Collection;
import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -38,7 +37,6 @@ import org.onap.aai.edges.enums.MultiplicityRule;
import org.onap.aai.edges.exceptions.AmbiguousRuleChoiceException;
import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException;
import org.onap.aai.restclient.MockProvider;
-import org.onap.aai.restclient.MockRestClient;
import org.onap.aai.setup.SchemaVersion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@@ -50,10 +48,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {MockProvider.class, EdgesConfiguration.class})
@TestPropertySource(
- properties = {
- "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties",
- "spring.main.allow-bean-definition-overriding=true"
- })
+ properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties",
+ "spring.main.allow-bean-definition-overriding=true"})
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@SpringBootTest
public class EdgeIngestorTest {
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java
index 0a6a3f07..543ce273 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorWiringTest.java
@@ -24,13 +24,11 @@ import static org.junit.Assert.*;
import com.google.common.collect.Multimap;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.aai.config.EdgesConfiguration;
import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException;
import org.onap.aai.setup.SchemaVersion;
-import org.onap.aai.setup.SchemaVersionsBean;
import org.onap.aai.testutils.ConfigTranslatorForWiringTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorLocalTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorLocalTest.java
index 83d7dc44..6e00eb73 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorLocalTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorLocalTest.java
@@ -20,6 +20,27 @@
package org.onap.aai.nodes;
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+import javax.xml.bind.SchemaOutputResolver;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
import org.eclipse.persistence.dynamic.DynamicEntity;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
import org.junit.Rule;
@@ -37,26 +58,6 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
import org.w3c.dom.Document;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Result;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.*;
-
@RunWith(SpringRunner.class)
@TestPropertySource(
properties = {
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java
index b70b1bfc..fff22116 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java
@@ -20,6 +20,27 @@
package org.onap.aai.nodes;
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+import javax.xml.bind.SchemaOutputResolver;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
import org.eclipse.persistence.dynamic.DynamicEntity;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
import org.junit.Rule;
@@ -37,32 +58,10 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.w3c.dom.Document;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Result;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.*;
-
@RunWith(SpringJUnit4ClassRunner.class)
@TestPropertySource(
- properties = {
- "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-ss-wiring-test.properties",
- "spring.main.allow-bean-definition-overriding=true"
- })
+ properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-ss-wiring-test.properties",
+ "spring.main.allow-bean-definition-overriding=true"})
@ContextConfiguration(classes = {MockProvider.class, NodesConfiguration.class})
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java
index d2412c08..7ae0a2cd 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorWiringTest.java
@@ -24,12 +24,10 @@ import static org.junit.Assert.*;
import org.eclipse.persistence.dynamic.DynamicEntity;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.aai.config.NodesConfiguration;
import org.onap.aai.setup.SchemaVersion;
-import org.onap.aai.setup.SchemaVersionsBean;
import org.onap.aai.testutils.ConfigTranslatorForWiringTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockProvider.java b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockProvider.java
index 09b8d3a7..16af4842 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockProvider.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockProvider.java
@@ -20,7 +20,6 @@
package org.onap.aai.restclient;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java
index 8ce496ef..74d254b1 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/MockRestClient.java
@@ -26,6 +26,10 @@ import static org.springframework.test.web.client.match.MockRestRequestMatchers.
import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
@@ -48,10 +52,6 @@ import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-
@Component
public class MockRestClient extends RestClient {
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java
index 53134075..cbbc63d3 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/restclient/SchemaRestClientTest.java
@@ -26,7 +26,6 @@ import java.util.Map;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.onap.aai.restclient.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpMethod;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java
index d2852925..fa6d8edc 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/CheckEverythingStrategyTest.java
@@ -23,7 +23,6 @@ package org.onap.aai.validation;
import static org.junit.Assert.*;
import org.junit.Test;
-import org.onap.aai.validation.CheckEverythingStrategy;
public class CheckEverythingStrategyTest {
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java
index ceced416..0dc68c48 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/FailFastStrategyTest.java
@@ -25,8 +25,6 @@ import static org.junit.Assert.*;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.onap.aai.validation.AAISchemaValidationException;
-import org.onap.aai.validation.FailFastStrategy;
public class FailFastStrategyTest {
@Rule
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java
index 4bab99a1..4c6882c8 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorRainyDayTest.java
@@ -22,13 +22,10 @@ package org.onap.aai.validation;
import static org.junit.Assert.*;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.aai.config.NodesConfiguration;
-import org.onap.aai.nodes.NodeIngestor;
import org.onap.aai.setup.SchemaVersion;
-import org.onap.aai.setup.SchemaVersionsBean;
import org.onap.aai.testutils.BadNodeConfigForValidationTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java
index 2598928e..a74f7ba9 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/VersionValidatorSunnyDayTest.java
@@ -22,12 +22,9 @@ package org.onap.aai.validation;
import static org.junit.Assert.*;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.aai.config.NodesConfiguration;
-import org.onap.aai.nodes.NodeIngestor;
-import org.onap.aai.setup.SchemaVersionsBean;
import org.onap.aai.testutils.GoodConfigForValidationTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorRainyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorRainyDayTest.java
index 75b27716..b1bf3146 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorRainyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorRainyDayTest.java
@@ -22,12 +22,9 @@ package org.onap.aai.validation.edges;
import static org.junit.Assert.*;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.aai.config.NodesConfiguration;
-import org.onap.aai.nodes.NodeIngestor;
-import org.onap.aai.setup.SchemaVersionsBean;
import org.onap.aai.testutils.BadEdgeConfigForValidationTest;
import org.onap.aai.validation.CheckEverythingStrategy;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java
index ca6b3171..60943219 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/EdgeRuleValidatorSunnyDayTest.java
@@ -22,12 +22,9 @@ package org.onap.aai.validation.edges;
import static org.junit.Assert.*;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.aai.config.NodesConfiguration;
-import org.onap.aai.nodes.NodeIngestor;
-import org.onap.aai.setup.SchemaVersionsBean;
import org.onap.aai.testutils.GoodConfigForValidationTest;
import org.onap.aai.validation.CheckEverythingStrategy;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java
index cc38915c..e80e2fea 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/edges/NodeTypesValidationModuleTest.java
@@ -25,13 +25,10 @@ import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.aai.config.NodesConfiguration;
-import org.onap.aai.nodes.NodeIngestor;
import org.onap.aai.setup.SchemaVersion;
-import org.onap.aai.setup.SchemaVersionsBean;
import org.onap.aai.testutils.TestUtilConfigTranslator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorRainyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorRainyDayTest.java
index e164df04..93cb2ab3 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorRainyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorRainyDayTest.java
@@ -27,8 +27,6 @@ import org.junit.runner.RunWith;
import org.onap.aai.config.NodesConfiguration;
import org.onap.aai.testutils.BadNodeConfigForValidationTest;
import org.onap.aai.validation.CheckEverythingStrategy;
-import org.onap.aai.validation.nodes.DefaultDuplicateNodeDefinitionValidationModule;
-import org.onap.aai.validation.nodes.NodeValidator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSchemaIncompleteTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSchemaIncompleteTest.java
index 288913b1..c2e7b7ba 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSchemaIncompleteTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSchemaIncompleteTest.java
@@ -41,10 +41,8 @@ import org.onap.aai.config.NodesConfiguration;
import org.onap.aai.nodes.NodeIngestor;
import org.onap.aai.setup.SchemaVersion;
import org.onap.aai.testutils.SchemaIncompleteTranslator;
-import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.context.annotation.Import;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java
index 81b69e6e..893dd04c 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/validation/nodes/NodeValidatorSunnyDayTest.java
@@ -27,8 +27,6 @@ import org.junit.runner.RunWith;
import org.onap.aai.config.NodesConfiguration;
import org.onap.aai.testutils.GoodConfigForValidationTest;
import org.onap.aai.validation.CheckEverythingStrategy;
-import org.onap.aai.validation.nodes.DefaultDuplicateNodeDefinitionValidationModule;
-import org.onap.aai.validation.nodes.NodeValidator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;