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;
WidgetsCatalogMarkupController widgetsCatalogMarkupController = new WidgetsCatalogMarkupController();
@Mock
- ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+ WidgetMService widgetMService = new WidgetMServiceImpl();
@Mock
RestTemplate template = new RestTemplate();
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"));