2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.servlets;
23 import static org.mockito.Mockito.mock;
25 import javax.servlet.ServletContext;
26 import javax.servlet.http.HttpServletRequest;
27 import javax.ws.rs.core.Response;
29 import org.junit.Test;
30 import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic;
31 import org.openecomp.sdc.be.components.impl.DistributionMonitoringBusinessLogic;
32 import org.openecomp.sdc.be.components.impl.GroupBusinessLogic;
33 import org.openecomp.sdc.be.impl.ComponentsUtils;
34 import org.openecomp.sdc.be.user.UserBusinessLogic;
36 public class DistributionServiceServletTest {
38 private DistributionServiceServlet createTestSubject() {
39 UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
40 ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
41 DistributionMonitoringBusinessLogic distributionMonitoringLogic = mock(DistributionMonitoringBusinessLogic.class);
42 return new DistributionServiceServlet(userBusinessLogic, componentsUtils,
43 distributionMonitoringLogic);
48 public void testGetServiceById() throws Exception {
49 DistributionServiceServlet testSubject;
50 String serviceUUID = "";
51 HttpServletRequest request = null;
56 testSubject = createTestSubject();
61 public void testGetListOfDistributionStatuses() throws Exception {
62 DistributionServiceServlet testSubject;
64 HttpServletRequest request = null;
69 testSubject = createTestSubject();
74 public void testInit() throws Exception {
75 DistributionServiceServlet testSubject;
76 HttpServletRequest request = null;
79 testSubject = createTestSubject();
84 public void testGetDistributionBL() throws Exception {
85 DistributionServiceServlet testSubject;
86 ServletContext context = null;
87 DistributionMonitoringBusinessLogic result;
90 testSubject = createTestSubject();