1 /*******************************************************************************
2 * ============LICENSE_START==========================================
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * ============LICENSE_END=============================================
22 * ====================================================================
23 *******************************************************************************/
24 package org.onap.music.eelf.logging;
26 import java.io.IOException;
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;
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;
39 public class MusicContainerFilterTest {
40 MusicContainerFilter filter;
43 public void setup() throws IOException {
44 filter = new MusicContainerFilter();
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);