Sonar Fixes, Formatting
[aaf/authz.git] / auth / auth-core / src / test / java / org / onap / aaf / auth / rserv / test / JU_Routes.java
1 /*******************************************************************************
2  * ============LICENSE_START====================================================
3  * * org.onap.aaf
4  * * ===========================================================================
5  * * Copyright © 2017 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
10  * *
11  *  *      http://www.apache.org/licenses/LICENSE-2.0
12  * *
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====================================================
19  * *
20  * *
21  ******************************************************************************/
22
23 package org.onap.aaf.auth.rserv.test;
24
25 import static org.junit.Assert.*;
26
27 import java.io.IOException;
28 import java.util.List;
29
30 import javax.servlet.ServletException;
31 import javax.servlet.http.HttpServletRequest;
32
33 import org.junit.Before;
34 import org.junit.Test;
35 import org.junit.runner.RunWith;
36 import org.mockito.Mock;
37 import static org.mockito.Mockito.*;
38 //import org.onap.aaf.auth.rserv.CodeSetter;
39 import org.onap.aaf.auth.rserv.Route;
40 import org.onap.aaf.auth.rserv.Routes;
41 import org.onap.aaf.misc.env.Trans;
42 import org.powermock.modules.junit4.PowerMockRunner;
43
44 @RunWith(PowerMockRunner.class)
45 public class JU_Routes {
46     Routes routes;
47     @Mock
48     HttpServletRequest reqMock;
49     //TODO: Gabe [JUnit] Not visible to junit
50     //CodeSetter<Trans> codeSetterMock;
51     Route<Trans> routeObj;
52
53     @Before
54     public void setUp(){
55         routes = new Routes();
56     }
57
58     @Test
59     public void testRouteReport(){
60         List listVal = routes.routeReport();
61         assertNotNull(listVal);
62     }
63
64     @Test
65     public void testDerive() throws IOException, ServletException{
66         routeObj = routes.derive(reqMock, null);
67
68     }
69
70
71
72
73 }