summaryrefslogtreecommitdiffstats
path: root/models/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'models/src/test')
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessageTest.java4
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageTest.java6
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantStatusTest.java1
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionChild.java3
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionElementChild.java3
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java9
6 files changed, 4 insertions, 22 deletions
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessageTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessageTest.java
index 32f9b2462..d090d4047 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessageTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantAckMessageTest.java
@@ -30,14 +30,10 @@ import java.util.UUID;
import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.models.acm.utils.CommonTestData;
import org.onap.policy.common.utils.coder.CoderException;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
class ParticipantAckMessageTest {
private ParticipantAckMessage message;
- private static final ToscaConceptIdentifier PTYPE_456 = new ToscaConceptIdentifier("PType", "4.5.6");
- private static final ToscaConceptIdentifier PTYPE_457 = new ToscaConceptIdentifier("PType", "4.5.7");
-
@Test
void testCopyConstructor() throws CoderException {
assertThatThrownBy(() -> new ParticipantAckMessage((ParticipantAckMessage) null))
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageTest.java
index 96d3ac8a3..59f2d885d 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantMessageTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021-2022 Nordix Foundation.
+ * Copyright (C) 2021-2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,14 +31,10 @@ import java.util.UUID;
import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.models.acm.utils.CommonTestData;
import org.onap.policy.common.utils.coder.CoderException;
-import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
class ParticipantMessageTest {
private ParticipantMessage message;
- private static final ToscaConceptIdentifier PTYPE_456 = new ToscaConceptIdentifier("PType", "4.5.6");
- private static final ToscaConceptIdentifier PTYPE_457 = new ToscaConceptIdentifier("PType", "4.5.7");
-
@Test
void testCopyConstructor() throws CoderException {
assertThatThrownBy(() -> new ParticipantMessage((ParticipantMessage) null))
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantStatusTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantStatusTest.java
index feeb692e1..bbba9cbc2 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantStatusTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantStatusTest.java
@@ -56,7 +56,6 @@ class ParticipantStatusTest {
orig.setAutomationCompositionId(automationCompositionId);
var participantId = CommonTestData.getParticipantId();
orig.setParticipantId(participantId);
- var type = new ToscaConceptIdentifier("type", "2.3.4");
orig.setMessageId(UUID.randomUUID());
orig.setState(ParticipantState.ON_LINE);
orig.setTimestamp(Instant.ofEpochMilli(3000));
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionChild.java b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionChild.java
index c7f4351c7..d77f5d9df 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionChild.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionChild.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021,2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,5 +24,4 @@ package org.onap.policy.clamp.models.acm.persistence.concepts;
* Test class for {@link JpaAutomationComposition} comparisons.
*/
class DummyJpaAutomationCompositionChild extends JpaAutomationComposition {
- private static final long serialVersionUID = -5101743610779424064L;
}
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionElementChild.java b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionElementChild.java
index 86723d98f..65bfcb745 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionElementChild.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/concepts/DummyJpaAutomationCompositionElementChild.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021,2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,5 +24,4 @@ package org.onap.policy.clamp.models.acm.persistence.concepts;
* Test class for {@link JpaAutomationCompositionElement} comparisons.
*/
class DummyJpaAutomationCompositionElementChild extends JpaAutomationCompositionElement {
- private static final long serialVersionUID = -5101743610779424064L;
}
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java
index 3e100df18..52e90b53a 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/ParticipantProviderTest.java
@@ -96,10 +96,6 @@ class ParticipantProviderTest {
var automationCompositionElementRepository = mock(AutomationCompositionElementRepository.class);
var nodeTemplateStateRepository = mock(NodeTemplateStateRepository.class);
- for (var participant : jpaParticipantList) {
- when(participantRepository.getById(participant.getParticipantId()))
- .thenReturn(participant);
- }
var participantProvider = new ParticipantProvider(participantRepository,
automationCompositionElementRepository, nodeTemplateStateRepository);
@@ -118,10 +114,7 @@ class ParticipantProviderTest {
var participantRepository = mock(ParticipantRepository.class);
var automationCompositionElementRepository = mock(AutomationCompositionElementRepository.class);
var nodeTemplateStateRepository = mock(NodeTemplateStateRepository.class);
- for (var participant : jpaParticipantList) {
- when(participantRepository.getById(participant.getParticipantId()))
- .thenReturn(participant);
- }
+
var participantProvider = new ParticipantProvider(participantRepository,
automationCompositionElementRepository, nodeTemplateStateRepository);