diff options
author | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2020-08-18 19:59:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-18 19:59:41 +0000 |
commit | 5043fe35ad57216fbc8708cfb7939403358ba265 (patch) | |
tree | d55f06279e9cd283f49e701f352a6dd28c0d9bf9 | |
parent | 24d0f7d197760680287f2c53e703e99201c35ec5 (diff) | |
parent | a73217b479a500fb9420dbcb453a134ec8d1eee7 (diff) |
Merge "SONAR fixes - assert dissimiliar types"
22 files changed, 27 insertions, 34 deletions
diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java index 6e588dbe3..445f831e6 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java @@ -74,7 +74,7 @@ public class EngineServiceInfoResponseTest { // disabling sonar because this code tests the equals() method assertEquals(response, response); // NOSONAR assertNotNull(response); - assertNotEquals(response, new StartEngine(new AxArtifactKey())); + assertNotEquals(response, (Object) new StartEngine(new AxArtifactKey())); response = new EngineServiceInfoResponse(null, false, null); EngineServiceInfoResponse otherResponse = new EngineServiceInfoResponse(null, false, null); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java index b22d45c05..5a57ba3a6 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java @@ -62,7 +62,7 @@ public class AxKeyInfoTest { assertEquals(testKeyInfo, testKeyInfo); // NOSONAR assertEquals(testKeyInfo, clonedReferenceKey); assertNotNull(testKeyInfo); - assertNotEquals(testKeyInfo, new AxArtifactKey()); + assertNotEquals(testKeyInfo, (Object) new AxArtifactKey()); assertNotEquals(testKeyInfo, new AxKeyInfo(new AxArtifactKey())); assertNotEquals(testKeyInfo, new AxKeyInfo(key, UUID.randomUUID(), "Some Description")); assertNotEquals(testKeyInfo, new AxKeyInfo(key, uuid, "Some Description")); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java index 60c848d17..1e8e7f5af 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java @@ -111,7 +111,7 @@ public class AxKeyTest { assertNotNull(someKey0); // disabling sonar because this code tests the equals() method assertEquals(someKey0, someKey0); // NOSONAR - assertNotEquals(someKey0, new AxReferenceKey()); + assertNotEquals(someKey0, (Object) new AxReferenceKey()); AxArtifactKey nullKey0 = AxArtifactKey.getNullKey(); assertTrue(nullKey0.isNullKey()); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java index 4c6020226..5346b6b21 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java @@ -63,7 +63,7 @@ public class AxKeyUseTest { // disabling sonar because this code tests the equals() method assertEquals(keyUse, keyUse); // NOSONAR assertEquals(keyUse, clonedKeyUse); - assertNotEquals(keyUse, "Hello"); + assertNotEquals(keyUse, (Object) "Hello"); assertEquals(keyUse, new AxKeyUse(key)); assertEquals(0, keyUse.compareTo(keyUse)); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java index e7bbef476..515587558 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java @@ -89,7 +89,7 @@ public class AxReferenceKeyTest { // disabling sonar because this code tests the equals() method assertEquals(testReferenceKey, testReferenceKey); // NOSONAR assertEquals(testReferenceKey, clonedReferenceKey); - assertNotEquals(testReferenceKey, "Hello"); + assertNotEquals(testReferenceKey, (Object) "Hello"); assertNotEquals(testReferenceKey, new AxReferenceKey("PKN", "0.0.2", "PLN", "LN")); assertNotEquals(testReferenceKey, new AxReferenceKey("NPKN", "0.0.2", "PLN", "LN")); assertNotEquals(testReferenceKey, new AxReferenceKey("NPKN", "0.0.1", "PLN", "LN")); diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java index c2657bc7e..8ce072c68 100644 --- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java +++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java @@ -73,7 +73,7 @@ public class SupportApexBasicModelConceptsTester { assertEquals(model, model); // NOSONAR assertEquals(model, clonedModel); assertNotNull(model); - assertNotEquals(model, "Hello"); + assertNotEquals(model, (Object) "Hello"); clonedModel.getKey().setVersion("0.0.2"); assertNotEquals(model, clonedModel); clonedModel.getKey().setVersion("0.0.1"); @@ -95,7 +95,7 @@ public class SupportApexBasicModelConceptsTester { final AxKeyInformation clonedKeyI = new AxKeyInformation(keyI); assertNotNull(keyI); - assertNotEquals(keyI, new AxArtifactKey()); + assertNotEquals(keyI, (Object) new AxArtifactKey()); assertEquals(keyI, clonedKeyI); clonedKeyI.setKey(new AxArtifactKey()); diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java index 2e2005fcd..154739b90 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java @@ -119,7 +119,7 @@ public class ContextAlbumsTest { assertEquals(album, album); // NOSONAR assertEquals(album, clonedAlbum); assertNotNull(album); - assertNotEquals(album, "Hello"); + assertNotEquals(album, (Object) "Hello"); assertNotEquals(album, new AxContextAlbum(new AxArtifactKey(), "Scope", false, AxArtifactKey.getNullKey())); assertNotEquals(album, new AxContextAlbum(newKey, "Scope", false, AxArtifactKey.getNullKey())); assertNotEquals(album, new AxContextAlbum(newKey, "NewAlbumScope", false, AxArtifactKey.getNullKey())); @@ -185,7 +185,7 @@ public class ContextAlbumsTest { assertEquals(albums, clonedAlbums); assertNotNull(albums); - assertNotEquals(albums, "Hello"); + assertNotEquals(albums, (Object) "Hello"); assertNotEquals(albums, new AxContextAlbums(new AxArtifactKey())); assertEquals(0, albums.compareTo(albums)); diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java index ae6de38f2..eab561e25 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java @@ -63,7 +63,7 @@ public class ContextModelTest { // disabling sonar because this code tests the equals() method assertEquals(model, model); // NOSONAR assertEquals(model, clonedModel); - assertNotEquals(model, "Hello"); + assertNotEquals(model, (Object) "Hello"); assertNotEquals(model, new AxContextModel(new AxArtifactKey())); assertNotEquals(model, new AxContextModel(new AxArtifactKey(), new AxContextSchemas(), new AxContextAlbums(), new AxKeyInformation())); diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java index 55844d9d9..6de0a5214 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java @@ -107,7 +107,7 @@ public class ContextSchemasTest { assertEquals(schema, schema); // NOSONAR assertEquals(schema, clonedSchema); assertNotNull(schema); - assertNotEquals(schema, "Hello"); + assertNotEquals(schema, (Object) "Hello"); assertNotEquals(schema, new AxContextSchema(new AxArtifactKey(), "Flavour", "Def")); assertNotEquals(schema, new AxContextSchema(newKey, "Flavour", "Def")); assertNotEquals(schema, new AxContextSchema(newKey, "NewSchemaFlavour", "Def")); @@ -168,7 +168,7 @@ public class ContextSchemasTest { assertEquals(schemas, clonedSchemas); assertNotNull(schemas); - assertNotEquals(schemas, "Hello"); + assertNotEquals(schemas, (Object) "Hello"); assertNotEquals(schemas, new AxContextSchemas(new AxArtifactKey())); assertEquals(0, schemas.compareTo(schemas)); diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java index 9d1c7bf44..5c87e5621 100644 --- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java +++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java @@ -101,7 +101,7 @@ public class EngineModelTest { // disabling sonar because this code tests the equals() method assertEquals(model, model); // NOSONAR assertEquals(model, clonedModel); - assertNotEquals(model, "Hello"); + assertNotEquals(model, (Object) "Hello"); assertNotEquals(model, new AxEngineModel(new AxArtifactKey())); assertNotEquals(model, new AxEngineModel(new AxArtifactKey(), new AxContextSchemas(schemasKey), new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats)); diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java index 1731bcddc..cdc5fecf6 100644 --- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java +++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java @@ -61,7 +61,7 @@ public class EventModelTest { // disabling sonar because this code tests the equals() method assertEquals(model, model); // NOSONAR assertEquals(model, clonedModel); - assertNotEquals(model, "Hello"); + assertNotEquals(model, (Object) "Hello"); assertNotEquals(model, new AxEventModel(new AxArtifactKey())); assertNotEquals(model, new AxEventModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey))); diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java index a2d562a6f..21601d770 100644 --- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java +++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java @@ -191,7 +191,7 @@ public class EventsTest { assertEquals(event, event); // NOSONAR assertEquals(event, clonedEvent); assertNotNull(event); - assertNotEquals(event, "Hello"); + assertNotEquals(event, (Object) "Hello"); assertNotEquals( event, new AxEvent(AxArtifactKey.getNullKey(), "namespace", "source", "target", parameterMap)); assertNotEquals(event, new AxEvent(eventKey, "namespace1", "source", "target", parameterMap)); @@ -273,7 +273,7 @@ public class EventsTest { assertEquals(events, clonedEvents); assertNotNull(events); - assertNotEquals(events, "Hello"); + assertNotEquals(events, (Object) "Hello"); assertNotEquals(events, new AxEvents(new AxArtifactKey())); assertEquals(0, events.compareTo(events)); diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java index dd76d329c..6ec46dbd5 100644 --- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java +++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java @@ -113,7 +113,7 @@ public class FieldTest { assertEquals(field, field); // NOSONAR assertEquals(field, clonedField); assertNotNull(field); - assertNotEquals(field, "Hello"); + assertNotEquals(field, (Object) "Hello"); assertNotEquals(field, new AxField(AxReferenceKey.getNullKey(), AxArtifactKey.getNullKey(), false)); assertNotEquals(field, new AxField(fieldKey, AxArtifactKey.getNullKey(), false)); assertNotEquals(field, new AxField(fieldKey, schemaKey, false)); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java index c9dbac3e0..fbfc7c4a0 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java @@ -141,7 +141,7 @@ public class LogicTest { assertEquals(logic, logic); // NOSONAR assertEquals(logic, clonedLogic); assertNotNull(logic); - assertNotEquals(logic, "Hello"); + assertNotEquals(logic, (Object) "Hello"); assertNotEquals(logic, new AxLogic(AxReferenceKey.getNullKey(), "LogicFlavour", "Logic")); assertNotEquals(logic, new AxLogic(logicKey, "AnotherLogicFlavour", "Logic")); assertNotEquals(logic, new AxLogic(logicKey, "LogicFlavour", "AnotherLogic")); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java index 7b0dbaf86..e724a4663 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java @@ -213,7 +213,7 @@ public class PoliciesTest { assertEquals(policyPN, policyPN); // NOSONAR assertEquals(policyPN, clonedPolicy); assertNotNull(policyPN); - assertNotEquals(policyPN, "Hello"); + assertNotEquals(policyPN, (Object) "Hello"); assertNotEquals(policyPN, new AxPolicy(AxArtifactKey.getNullKey(), savedTemplate, savedStateMap, savedFirstState)); assertNotEquals(policyPN, new AxPolicy(savedPolicyKey, "SomeTemplate", savedStateMap, savedFirstState)); @@ -298,7 +298,7 @@ public class PoliciesTest { assertEquals(policies, policies); // NOSONAR assertEquals(policies, clonedPolicies); assertNotNull(policies); - assertNotEquals(policies, "Hello"); + assertNotEquals(policies, (Object) "Hello"); assertNotEquals(policies, new AxPolicies(new AxArtifactKey())); assertEquals(0, policies.compareTo(policies)); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java index 30b92ca4c..86bbf3e93 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java @@ -82,7 +82,7 @@ public class PolicyModelTest { // disabling sonar because this code tests the equals() method assertEquals(model, model); // NOSONAR assertEquals(model, clonedModel); - assertNotEquals(model, "Hello"); + assertNotEquals(model, (Object) "Hello"); assertNotEquals(model, new AxPolicyModel(new AxArtifactKey())); assertNotEquals(model, new AxPolicyModel(AxArtifactKey.getNullKey(), new AxContextSchemas(schemasKey), new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey), new AxContextAlbums(albumsKey), diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java index 7e243f567..8bd29fc55 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java @@ -103,7 +103,7 @@ public class StateOutputTest { assertEquals(so, so); // NOSONAR assertEquals(so, clonedPar); assertNotNull(so); - assertNotEquals(so, "Hello"); + assertNotEquals(so, (Object) "Hello"); assertNotEquals(so, new AxStateOutput(AxReferenceKey.getNullKey(), eKey, nsKey)); assertNotEquals(so, new AxStateOutput(soKey, new AxArtifactKey(), nsKey)); assertNotEquals(so, new AxStateOutput(soKey, eKey, new AxReferenceKey())); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java index d1cd3ede3..568c47f61 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java @@ -118,7 +118,7 @@ public class StateTaskReferenceTest { assertEquals(stRef, stRef); // NOSONAR assertEquals(stRef, clonedStRef); assertNotNull(stRef); - assertNotEquals(stRef, "Hello"); + assertNotEquals(stRef, (Object) "Hello"); assertNotEquals(stRef, new AxStateTaskReference(AxReferenceKey.getNullKey(), AxStateTaskOutputType.LOGIC, soKey)); assertNotEquals(stRef, new AxStateTaskReference(stRefKey, AxStateTaskOutputType.DIRECT, soKey)); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java index 4fe554137..95a91325a 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java @@ -387,7 +387,7 @@ public class StateTest { assertEquals(state, state); // NOSONAR assertEquals(state, clonedState); assertNotNull(state); - assertNotEquals(state, "Hello"); + assertNotEquals(state, (Object) "Hello"); assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(new AxReferenceKey()).trigger(triggerKey) .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl) .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap))); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java index 8af19190a..4255b495d 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java @@ -92,7 +92,7 @@ public class TaskParameterTest { assertEquals(par, par); // NOSONAR assertEquals(par, clonedPar); assertNotNull(par); - assertNotEquals(par, "Hello"); + assertNotEquals(par, (Object) "Hello"); assertNotEquals(par, new AxTaskParameter(AxReferenceKey.getNullKey(), "DefaultValue")); assertNotEquals(par, new AxTaskParameter(parKey, "OtherDefaultValue")); assertEquals(par, new AxTaskParameter(parKey, "DefaultValue")); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java index 6a6c6589f..100adb9fd 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java @@ -223,7 +223,7 @@ public class TasksTest { assertEquals(task, task); // NOSONAR assertEquals(task, clonedTask); assertNotNull(task); - assertNotEquals(task, "Hello"); + assertNotEquals(task, (Object) "Hello"); assertNotEquals(task, new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, tl)); assertNotEquals(task, new AxTask(taskKey, ifEmptyMap, ofMap, tpMap, ctxtSet, tl)); assertNotEquals(task, new AxTask(taskKey, ifMap, ofEmptyMap, tpMap, ctxtSet, tl)); @@ -307,7 +307,7 @@ public class TasksTest { assertEquals(tasks, tasks); // NOSONAR assertEquals(tasks, clonedTasks); assertNotNull(tasks); - assertNotEquals(tasks, "Hello"); + assertNotEquals(tasks, (Object) "Hello"); assertNotEquals(tasks, new AxTasks(new AxArtifactKey())); assertEquals(0, tasks.compareTo(tasks)); diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java index ba4b225d2..75000883d 100644 --- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java +++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java @@ -180,19 +180,15 @@ public class TestEventInstantiation { assertEquals("This is a slogan", slogan2); final byte mc21 = (byte) event.get("TestMatchCase"); - assertNotNull(mc21); assertEquals(16, mc21); final byte mc22 = (byte) event.get("TestMatchCase"); - assertNotNull(mc22); assertEquals((byte) 16, mc22); final long timestamp2 = (Long) event.get("TestTimestamp"); - assertNotNull(timestamp2); assertEquals(timestamp2, timestamp1); final double temp2 = (double) event.get("TestTemperature"); - assertNotNull(temp2); assertEquals(123.456789, temp2, 0); final Double temp3 = (Double) event.get("TestTemperature"); @@ -213,15 +209,12 @@ public class TestEventInstantiation { assertEquals("This is a test slogan", slogan3); final byte mc31 = (byte) event.get("TestMatchCase"); - assertNotNull(mc31); assertEquals((byte) 123, mc31); final long timestamp3 = (Long) event.get("TestTimestamp"); - assertNotNull(timestamp3); assertEquals(timestamp3, aDate.getTime()); final double temp4 = (double) event.get("TestTemperature"); - assertNotNull(temp4); assertEquals(34.5445667, temp4, 0); logger.debug(event.toString()); |