X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fcontroller%2FWidgetsCatalogMarkupControllerTest.java;h=0e5e8c7937173aa30d259943458305d1f8acdc26;hb=ace89e59c9838b666ddd02c08fd5e39a94eee39a;hp=03031b40f917a01dfe6df0f73fc5a59e37131a7b;hpb=21a8761f684745bb300e075c7e98ad897ace9eed;p=portal.git diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java index 03031b40..0e5e8c79 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java @@ -33,7 +33,7 @@ * * ============LICENSE_END============================================ * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * */ package org.onap.portalapp.portal.controller; @@ -52,8 +52,8 @@ import org.mockito.MockitoAnnotations; import org.onap.portalapp.portal.controller.WidgetsCatalogMarkupController; import org.onap.portalapp.portal.domain.WidgetServiceHeaders; import org.onap.portalapp.portal.framework.MockitoTestSuite; -import org.onap.portalapp.portal.service.ConsulHealthService; -import org.onap.portalapp.portal.service.ConsulHealthServiceImpl; +import org.onap.portalapp.portal.service.WidgetMService; +import org.onap.portalapp.portal.service.WidgetMServiceImpl; import org.onap.portalapp.portal.utils.EcompPortalUtils; import org.onap.portalsdk.core.onboarding.util.CipherUtil; import org.onap.portalsdk.core.util.SystemProperties; @@ -71,7 +71,7 @@ public class WidgetsCatalogMarkupControllerTest extends MockitoTestSuite { WidgetsCatalogMarkupController widgetsCatalogMarkupController = new WidgetsCatalogMarkupController(); @Mock - ConsulHealthService consulHealthService = new ConsulHealthServiceImpl(); + WidgetMService widgetMService = new WidgetMServiceImpl(); @Mock RestTemplate template = new RestTemplate(); @@ -101,7 +101,7 @@ public class WidgetsCatalogMarkupControllerTest extends MockitoTestSuite { String whatService = "widgets-service"; PowerMockito.mockStatic(WidgetServiceHeaders.class); PowerMockito.mockStatic(EcompPortalUtils.class); - Mockito.when(template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService, null) + "/widget/microservices/markup/" + 1, String.class, + Mockito.when(template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://" + widgetMService.getServiceLocation(whatService, null) + "/widget/microservices/markup/" + 1, String.class, WidgetServiceHeaders.getInstance())).thenReturn("Success"); String response = widgetsCatalogMarkupController.getWidgetMarkup(mockedRequest, mockedResponse, 1); assertTrue(response.equals("Success"));