X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vid-app-common%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fvid%2Fcontroller%2FVidControllerTest.java;h=484f4a034476a3dc417ad15cc20e3689d95b93d3;hb=e601bbdc43bae9a08e2e10c5139a6f76b47860d7;hp=aeb03b60cc37108feaad53ea655e7cd15d4c70f2;hpb=2a7168b9bd968191413140e8c2afd72d6f47a26b;p=vid.git diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/VidControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/VidControllerTest.java index aeb03b60c..484f4a034 100644 --- a/vid-app-common/src/test/java/org/onap/vid/controller/VidControllerTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/controller/VidControllerTest.java @@ -2,14 +2,14 @@ * ============LICENSE_START======================================================= * VID * ================================================================================ - * Modifications Copyright 2018 Nokia + * Modifications Copyright 2018 - 2019 Nokia * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,7 +35,6 @@ import org.mockito.junit.MockitoJUnitRunner; import org.onap.vid.asdc.AsdcCatalogException; import org.onap.vid.asdc.beans.SecureServices; import org.onap.vid.asdc.beans.Service; -import org.onap.vid.asdc.beans.ServiceBuilder; import org.onap.vid.model.*; import org.onap.vid.model.PombaInstance.PombaRequest; import org.onap.vid.model.PombaInstance.ServiceInstance; @@ -151,8 +150,7 @@ public class VidControllerTest { @Test public void verifyServiceInstance_shouldReturnOk() throws Exception { - PombaRequest pombaRequest = new PombaRequest(); - pombaRequest.serviceInstanceList = ImmutableList.of(new ServiceInstance()); + PombaRequest pombaRequest = new PombaRequest(ImmutableList.of(new ServiceInstance())); mockMvc.perform(post(REST_MODELS_SERVICES_VERIFY_SERVICE) .contentType(MediaType.APPLICATION_JSON) @@ -172,7 +170,7 @@ public class VidControllerTest { } private Service createService(String uuid, int i) { - return new ServiceBuilder().setUuid(uuid).setInvariantUUID("invariantUUID" + i) + return new Service.ServiceBuilder().setUuid(uuid).setInvariantUUID("invariantUUID" + i) .setCategory("category" + i).setVersion("version" + i).setName("name" + i) .setDistributionStatus("distStatus" + i).setToscaModelURL("toscaModelUrl" + i).build(); } @@ -180,7 +178,7 @@ public class VidControllerTest { private ServiceModel createServiceModel(int i) { ServiceModel model = new ServiceModel(); - model.setCollectionResource(ImmutableMap.of("resKey" + i, new CR())); + model.setCollectionResources(ImmutableMap.of("resKey" + i, new CR())); model.setNetworks(ImmutableMap.of("network" + i, new Network())); model.setPnfs(ImmutableMap.of("pnf" + i, new Node())); model.setServiceProxies(ImmutableMap.of("servProxy" + i, new ServiceProxy())); @@ -201,4 +199,4 @@ public class VidControllerTest { return IntStream.range(0, pseudoServiceModels.size()).boxed() .collect(toMap(i -> uuids.get(i), i -> pseudoServiceModels.get(i))); } -} \ No newline at end of file +}