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 org.junit.Test;
24 import org.openecomp.sdc.be.components.impl.DistributionMonitoringBusinessLogic;
25 import org.openecomp.sdc.be.impl.ComponentsUtils;
26 import org.openecomp.sdc.be.user.UserBusinessLogic;
28 import javax.servlet.ServletContext;
29 import javax.servlet.http.HttpServletRequest;
30 import javax.ws.rs.core.Response;
32 import static org.mockito.Mockito.mock;
34 public class DistributionServiceServletTest {
36 private DistributionServiceServlet createTestSubject() {
37 UserBusinessLogic userBusinessLogic = mock(UserBusinessLogic.class);
38 ComponentsUtils componentsUtils = mock(ComponentsUtils.class);
39 DistributionMonitoringBusinessLogic distributionMonitoringLogic = mock(DistributionMonitoringBusinessLogic.class);
40 return new DistributionServiceServlet(userBusinessLogic, componentsUtils,
41 distributionMonitoringLogic);
46 public void testGetServiceById() throws Exception {
47 DistributionServiceServlet testSubject;
48 String serviceUUID = "";
49 HttpServletRequest request = null;
54 testSubject = createTestSubject();
59 public void testGetListOfDistributionStatuses() throws Exception {
60 DistributionServiceServlet testSubject;
62 HttpServletRequest request = null;
67 testSubject = createTestSubject();
72 public void testInit() throws Exception {
73 DistributionServiceServlet testSubject;
74 HttpServletRequest request = null;
77 testSubject = createTestSubject();
82 public void testGetDistributionBL() throws Exception {
83 DistributionServiceServlet testSubject;
84 ServletContext context = null;
85 DistributionMonitoringBusinessLogic result;
88 testSubject = createTestSubject();