junit Testcase for MusicContainerFilter
[music.git] / music-rest / src / test / java / org / onap / music / eelf / logging / MusicContainerFilterTest.java
1 /*******************************************************************************
2  * ============LICENSE_START==========================================
3  * org.onap.music
4  * ===================================================================
5  *  Copyright (c) 2019 AT&T Intellectual Property
6  * ===================================================================
7  * Modifications Copyright (C) 2020 IBM.
8  * ===================================================================
9  *  Licensed under the Apache License, Version 2.0 (the "License");
10  *  you may not use this file except in compliance with the License.
11  *  You may obtain a copy of the License at
12  *
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  *
15  *  Unless required by applicable law or agreed to in writing, software
16  *  distributed under the License is distributed on an "AS IS" BASIS,
17  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  *  See the License for the specific language governing permissions and
19  *  limitations under the License.
20  *
21  * ============LICENSE_END=============================================
22  * ====================================================================
23  *******************************************************************************/
24 package org.onap.music.eelf.logging;
25
26 import java.io.IOException;
27
28 import javax.servlet.ServletException;
29 import javax.ws.rs.container.ContainerRequestContext;
30 import javax.ws.rs.container.ContainerResponseContext;
31 import javax.ws.rs.container.ContainerResponseFilter;
32
33 import org.springframework.stereotype.Component;
34 import org.junit.Before;
35 import org.junit.Test;
36 import org.mockito.Mockito;
37 import org.onap.music.main.MusicUtil;
38
39 public class MusicContainerFilterTest {
40     MusicContainerFilter filter;
41
42     @Before
43     public void setup() throws IOException {
44         filter = new MusicContainerFilter();
45     }
46
47     @Test
48     public void testDoFilter() throws IOException {
49         ContainerResponseFilter fil=Mockito.mock(ContainerResponseFilter.class);
50         ContainerRequestContext req=Mockito.mock(ContainerRequestContext.class);
51         ContainerResponseContext res=Mockito.mock(ContainerResponseContext.class);
52         filter.filter(req,res);
53     }
54
55 }