diff options
Diffstat (limited to 'models/src/test')
2 files changed, 5 insertions, 6 deletions
diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java index 51a4fc7ae..d9c518b53 100644 --- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java +++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoopTest.java @@ -107,7 +107,7 @@ class ControlLoopTest { void testControlLoopElementStatisticsList() { var cl = new ControlLoop(); List<ClElementStatistics> emptylist = cl.getControlLoopElementStatisticsList(cl); - assertNull(emptylist); + assertEquals(List.of(), emptylist); var cl1 = getControlLoopTest(); List<ClElementStatistics> list = cl1.getControlLoopElementStatisticsList(cl1); diff --git a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ServiceTemplateProviderTest.java b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ServiceTemplateProviderTest.java index a4cbbfb0b..7f2731abf 100644 --- a/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ServiceTemplateProviderTest.java +++ b/models/src/test/java/org/onap/policy/clamp/controlloop/models/controlloop/persistence/provider/ServiceTemplateProviderTest.java @@ -25,7 +25,6 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -78,7 +77,7 @@ class ServiceTemplateProviderTest { var serviceTemplateProvider = new ServiceTemplateProvider(modelsProvider); var serviceTemplate = new ToscaServiceTemplate(); - when(modelsProvider.createServiceTemplate(eq(serviceTemplate))).thenReturn(serviceTemplate); + when(modelsProvider.createServiceTemplate(serviceTemplate)).thenReturn(serviceTemplate); var result = serviceTemplateProvider.createServiceTemplate(serviceTemplate); @@ -91,7 +90,7 @@ class ServiceTemplateProviderTest { serviceTemplate.setName("Name"); serviceTemplate.setVersion("1.0.0"); var modelsProvider = mock(PolicyModelsProvider.class); - when(modelsProvider.deleteServiceTemplate(eq(serviceTemplate.getName()), eq(serviceTemplate.getVersion()))) + when(modelsProvider.deleteServiceTemplate(serviceTemplate.getName(), serviceTemplate.getVersion())) .thenReturn(serviceTemplate); var serviceTemplateProvider = new ServiceTemplateProvider(modelsProvider); @@ -117,7 +116,7 @@ class ServiceTemplateProviderTest { serviceTemplate.setName("Name"); serviceTemplate.setVersion("1.0.0"); var modelsProvider = mock(PolicyModelsProvider.class); - when(modelsProvider.getServiceTemplateList(eq(serviceTemplate.getName()), eq(serviceTemplate.getVersion()))) + when(modelsProvider.getServiceTemplateList(serviceTemplate.getName(), serviceTemplate.getVersion())) .thenReturn(List.of(serviceTemplate)); var serviceTemplateProvider = new ServiceTemplateProvider(modelsProvider); @@ -133,7 +132,7 @@ class ServiceTemplateProviderTest { serviceTemplate.setName("Name"); serviceTemplate.setVersion("1.0.0"); var modelsProvider = mock(PolicyModelsProvider.class); - when(modelsProvider.getServiceTemplateList(eq(serviceTemplate.getName()), eq(serviceTemplate.getVersion()))) + when(modelsProvider.getServiceTemplateList(serviceTemplate.getName(), serviceTemplate.getVersion())) .thenReturn(List.of(serviceTemplate)); var serviceTemplateProvider = new ServiceTemplateProvider(modelsProvider); |