- private HttpServletRequest request;
- private MockHttpServletResponse response;
-
- @Before
- public void setUp() throws Exception {
- HttpSession mockSession = mock(HttpSession.class);
- request = mock(HttpServletRequest.class);
- response = new MockHttpServletResponse();
- User user = new User();
- user.setOrgUserId("Test");
- Mockito.when(mockSession.getAttribute(SystemProperties.getProperty("user_attribute_name"))).thenReturn(user);
- Mockito.when(request.getSession(false)).thenReturn(mockSession);
- }
-
- @Test
- public final void testGetPolicyUserInfo() {
- PolicyUserInfoController controller = new PolicyUserInfoController();
- controller.getPolicyUserInfo(request, response);
- try{
- assertTrue(response.getStatus() == 200);
- }catch(Exception e){
- fail();
- }
-
- }
-
+ private HttpServletRequest request;
+ private MockHttpServletResponse response;
+
+ @Before
+ public void setUp() throws Exception {
+ HttpSession mockSession = mock(HttpSession.class);
+ request = mock(HttpServletRequest.class);
+ response = new MockHttpServletResponse();
+ User user = new User();
+ user.setOrgUserId("Test");
+ Mockito.when(mockSession.getAttribute(SystemProperties.getProperty("user_attribute_name")))
+ .thenReturn(user);
+ Mockito.when(request.getSession(false)).thenReturn(mockSession);
+ }
+
+ @Test
+ public final void testGetPolicyUserInfo() {
+ PolicyUserInfoController controller = new PolicyUserInfoController();
+ controller.getPolicyUserInfo(request, response);
+ try {
+ assertTrue(response.getStatus() == 200);
+ } catch (Exception e) {
+ fail();
+ }
+ }