diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-10-14 09:30:31 +0000 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-10-14 09:30:31 +0000 |
commit | d629b626036a1ef1bc37e2b9aa5b5d2fcad1be66 (patch) | |
tree | bbb64ce713a6f3407d73ed256d48a5c83da1cdf3 /aai-core/src/test | |
parent | 271e8f5f853c7ed8c277f5c12607a4633dd5b136 (diff) |
Remove the apache commons-lang dependency in aai-common
Issue-ID: AAI-3551
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: Ib68b6fb43044532abf39c1ac088ef969c5aa00c2
Diffstat (limited to 'aai-core/src/test')
6 files changed, 48 insertions, 71 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/db/DbMethHelperTest.java b/aai-core/src/test/java/org/onap/aai/db/DbMethHelperTest.java index 07fa3890..6bea58f0 100644 --- a/aai-core/src/test/java/org/onap/aai/db/DbMethHelperTest.java +++ b/aai-core/src/test/java/org/onap/aai/db/DbMethHelperTest.java @@ -20,31 +20,39 @@ package org.onap.aai.db; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Multimap; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.when; + +import java.io.FileInputStream; +import java.io.IOException; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + import org.apache.commons.io.IOUtils; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.Graph; import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.apache.tinkerpop.gremlin.structure.VertexProperty; -import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphFactory; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; import org.onap.aai.AAISetup; -import org.onap.aai.DataLinkSetup; -import org.onap.aai.domain.model.AAIResource; -import org.onap.aai.edges.EdgeIngestor; import org.onap.aai.exceptions.AAIException; import org.onap.aai.introspection.Introspector; import org.onap.aai.introspection.Loader; import org.onap.aai.introspection.ModelType; import org.onap.aai.parsers.exceptions.AmbiguousMapAAIException; -import org.onap.aai.parsers.query.QueryParser; import org.onap.aai.serialization.db.DBSerializer; import org.onap.aai.serialization.db.EdgeSerializer; import org.onap.aai.serialization.engines.JanusGraphDBEngine; @@ -54,13 +62,6 @@ import org.onap.aai.setup.SchemaVersion; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.*; - -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.when; - @RunWith(value = Parameterized.class) @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class DbMethHelperTest extends AAISetup { diff --git a/aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java b/aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java index 8cfc300f..bda268c6 100644 --- a/aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java +++ b/aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java @@ -20,6 +20,18 @@ package org.onap.aai.introspection.sideeffect; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.when; + +import java.io.FileInputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.Collection; + import org.apache.commons.io.IOUtils; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.Graph; @@ -27,7 +39,12 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.structure.VertexProperty; import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphFactory; -import org.junit.*; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -47,19 +64,6 @@ import org.onap.aai.serialization.engines.JanusGraphDBEngine; import org.onap.aai.serialization.engines.QueryStyle; import org.onap.aai.serialization.engines.TransactionalGraphEngine; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; -import java.util.Collection; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.when; -import org.junit.Ignore; - @RunWith(value = Parameterized.class) @Ignore public class DataCopyTest extends AAISetup { diff --git a/aai-core/src/test/java/org/onap/aai/parsers/relationship/RelationshipToURITest.java b/aai-core/src/test/java/org/onap/aai/parsers/relationship/RelationshipToURITest.java index ea872d4e..9c190f81 100644 --- a/aai-core/src/test/java/org/onap/aai/parsers/relationship/RelationshipToURITest.java +++ b/aai-core/src/test/java/org/onap/aai/parsers/relationship/RelationshipToURITest.java @@ -36,7 +36,9 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.onap.aai.AAISetup; import org.onap.aai.exceptions.AAIException; -import org.onap.aai.introspection.*; +import org.onap.aai.introspection.Introspector; +import org.onap.aai.introspection.Loader; +import org.onap.aai.introspection.ModelType; import org.onap.aai.parsers.exceptions.AAIIdentityMapParseException; import org.onap.aai.parsers.exceptions.AmbiguousMapAAIException; import org.onap.aai.setup.SchemaVersion; diff --git a/aai-core/src/test/java/org/onap/aai/restcore/JettyObfuscationConversionCommandLineUtilTest.java b/aai-core/src/test/java/org/onap/aai/restcore/JettyObfuscationConversionCommandLineUtilTest.java index c86c371d..5adf5b26 100644 --- a/aai-core/src/test/java/org/onap/aai/restcore/JettyObfuscationConversionCommandLineUtilTest.java +++ b/aai-core/src/test/java/org/onap/aai/restcore/JettyObfuscationConversionCommandLineUtilTest.java @@ -20,38 +20,9 @@ package org.onap.aai.restcore; -import org.apache.commons.io.IOUtils; -import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; -import org.apache.tinkerpop.gremlin.structure.Graph; -import org.apache.tinkerpop.gremlin.structure.Vertex; -import org.janusgraph.core.JanusGraphFactory; -import org.junit.*; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.Assert; +import org.junit.Test; import org.onap.aai.AAISetup; -import org.onap.aai.db.DbMethHelper; -import org.onap.aai.exceptions.AAIException; -import org.onap.aai.introspection.Introspector; -import org.onap.aai.introspection.Loader; -import org.onap.aai.introspection.ModelType; -import org.onap.aai.parsers.exceptions.AmbiguousMapAAIException; -import org.onap.aai.serialization.db.DBSerializer; -import org.onap.aai.serialization.db.EdgeSerializer; -import org.onap.aai.serialization.engines.JanusGraphDBEngine; -import org.onap.aai.serialization.engines.QueryStyle; -import org.onap.aai.serialization.engines.TransactionalGraphEngine; -import org.onap.aai.setup.SchemaVersion; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.annotation.DirtiesContext; - -import java.io.FileInputStream; -import java.io.IOException; -import java.text.ParseException; -import java.util.*; - -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.when; public class JettyObfuscationConversionCommandLineUtilTest extends AAISetup { public static JettyObfuscationConversionCommandLineUtil jettyObfuscationConversionCommandLineUtil; diff --git a/aai-core/src/test/java/org/onap/aai/stress/IndexStressTest.java b/aai-core/src/test/java/org/onap/aai/stress/IndexStressTest.java index 143004ac..90cda070 100644 --- a/aai-core/src/test/java/org/onap/aai/stress/IndexStressTest.java +++ b/aai-core/src/test/java/org/onap/aai/stress/IndexStressTest.java @@ -20,23 +20,22 @@ package org.onap.aai.stress; -import org.apache.commons.lang.RandomStringUtils; +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.lang3.RandomStringUtils; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.janusgraph.core.JanusGraphTransaction; import org.junit.Before; -import org.junit.Test; import org.junit.Ignore; +import org.junit.Test; import org.onap.aai.AAISetup; import org.onap.aai.dbmap.AAIGraph; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.test.annotation.DirtiesContext; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.Set; - @Ignore("Run this only to test indexes limit") @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class IndexStressTest extends AAISetup { diff --git a/aai-core/src/test/resources/logback.xml b/aai-core/src/test/resources/logback.xml index 5badcb9f..5d4f7bf3 100644 --- a/aai-core/src/test/resources/logback.xml +++ b/aai-core/src/test/resources/logback.xml @@ -274,7 +274,7 @@ <!-- Other Loggers that may help troubleshoot --> <logger name="net.sf" level="WARN" /> - <logger name="org.apache.commons.httpclient" level="WARN" /> + <logger name="org.apache.commons3.httpclient" level="WARN" /> <logger name="org.apache.commons" level="WARN" /> <logger name="org.apache.coyote" level="WARN" /> <logger name="org.apache.jasper" level="WARN" /> |