diff options
author | William Reehil <william.reehil@att.com> | 2022-11-11 13:37:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-11-11 13:37:39 +0000 |
commit | 72b44a38290334c46a9dedc0be1dadcd08520515 (patch) | |
tree | 4ea0ae01f4dabf1b9781779b5fea790f9c2c03ba /aai-core/src/test | |
parent | 131345b4ef18b8dc2c346c6af59f90f0d3fde431 (diff) | |
parent | 2c9ee21f2cf8fc230decfc48e3f652fe11862216 (diff) |
Merge "Reduce the number of raw-type related warnings in aai-common"
Diffstat (limited to 'aai-core/src/test')
5 files changed, 34 insertions, 10 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/prevalidation/ValidationServiceTest.java b/aai-core/src/test/java/org/onap/aai/prevalidation/ValidationServiceTest.java index 7f6e5610..d017408f 100644 --- a/aai-core/src/test/java/org/onap/aai/prevalidation/ValidationServiceTest.java +++ b/aai-core/src/test/java/org/onap/aai/prevalidation/ValidationServiceTest.java @@ -115,7 +115,7 @@ public class ValidationServiceTest { String validationResponse = PayloadUtil.getResourcePayload("prevalidation/success-response-with-empty-violations.json"); - ResponseEntity responseEntity = Mockito.mock(ResponseEntity.class, Mockito.RETURNS_DEEP_STUBS); + ResponseEntity<String> responseEntity = Mockito.mock(ResponseEntity.class, Mockito.RETURNS_DEEP_STUBS); Mockito.when(restClient.execute(eq(ValidationService.VALIDATION_ENDPOINT), eq(HttpMethod.POST), any(), eq(pserverRequest))).thenReturn(responseEntity); diff --git a/aai-core/src/test/java/org/onap/aai/restcore/RESTAPITest.java b/aai-core/src/test/java/org/onap/aai/restcore/RESTAPITest.java index 3c099c75..4b73a7d7 100644 --- a/aai-core/src/test/java/org/onap/aai/restcore/RESTAPITest.java +++ b/aai-core/src/test/java/org/onap/aai/restcore/RESTAPITest.java @@ -27,7 +27,11 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; -import javax.ws.rs.core.*; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MultivaluedHashMap; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; import org.junit.Assert; import org.junit.BeforeClass; @@ -38,7 +42,7 @@ import org.onap.aai.exceptions.AAIException; public class RESTAPITest extends AAISetup { private static RESTAPI restapi; private static HttpHeaders httpHeaders; - private static Callable callable; + private static Callable<Response> callable; private static UriInfo info; private static Response response; diff --git a/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java b/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java index 282f6457..f921a77c 100644 --- a/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java +++ b/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializerTest.java @@ -21,14 +21,27 @@ package org.onap.aai.serialization.db; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.Edge; @@ -37,7 +50,12 @@ import org.apache.tinkerpop.gremlin.structure.T; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph; import org.janusgraph.core.JanusGraphFactory; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +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; @@ -987,7 +1005,7 @@ public class DbSerializerTest extends AAISetup { @Test public void cascadeL3NetworkPreventDeleteTest() throws AAIException, UnsupportedEncodingException { l3NetworkSetup(); - ArrayList expected_messages = new ArrayList<String>(); + ArrayList<String> expected_messages = new ArrayList<>(); expected_messages.add( "Object is being reference by additional objects preventing it from being deleted. Please clean up references from the following types [l3-interface-ipv4-address-list, l3-interface-ipv6-address-list]"); expected_messages.add( diff --git a/aai-core/src/test/java/org/onap/aai/serialization/queryformats/ResourceFormatTest.java b/aai-core/src/test/java/org/onap/aai/serialization/queryformats/ResourceFormatTest.java index 10178931..e26c56e2 100644 --- a/aai-core/src/test/java/org/onap/aai/serialization/queryformats/ResourceFormatTest.java +++ b/aai-core/src/test/java/org/onap/aai/serialization/queryformats/ResourceFormatTest.java @@ -20,7 +20,9 @@ package org.onap.aai.serialization.queryformats; -import static org.junit.Assert.*; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; @@ -130,7 +132,7 @@ public class ResourceFormatTest extends AAISetup { FormatFactory ff = new FormatFactory(loader, serializer, schemaVersions, basePath, "https://localhost:8447/aai/"); - MultivaluedMap mvm = new MultivaluedHashMap(); + MultivaluedMap<String, String> mvm = new MultivaluedHashMap<>(); mvm.add("depth", "0"); Formatter formatter = ff.get(Format.resource, mvm); diff --git a/aai-core/src/test/java/org/onap/aai/serialization/queryformats/SimpleFormatTest.java b/aai-core/src/test/java/org/onap/aai/serialization/queryformats/SimpleFormatTest.java index 7aebe84d..7634d22a 100644 --- a/aai-core/src/test/java/org/onap/aai/serialization/queryformats/SimpleFormatTest.java +++ b/aai-core/src/test/java/org/onap/aai/serialization/queryformats/SimpleFormatTest.java @@ -142,7 +142,7 @@ public class SimpleFormatTest extends AAISetup { FormatFactory ff = new FormatFactory(loader, serializer, schemaVersions, basePath, "https://localhost:8447/aai/"); - MultivaluedMap mvm = new MultivaluedHashMap(); + MultivaluedMap<String, String> mvm = new MultivaluedHashMap<>(); mvm.add("depth", "0"); Formatter formatter = ff.get(Format.simple, mvm); |