@PrepareForTest(UserUtils.class)
@Test
public void testSaveDictionaryController() throws IOException {

    HttpServletRequest mockRequest = Mockito.mock(HttpServletRequest.class);
    HttpServletResponse mockResponse = Mockito.mock(HttpServletResponse.class);
    PolicyRestController controller = new PolicyRestController();
    User mockUser = Mockito.mock(User.class);
    PowerMockito.mockStatic(UserUtils.class);
    PrintWriter mockPrintWriter = Mockito.mock(PrintWriter.class);
    when(mockRequest.getRequestURI()).thenReturn("//testRequestURI///saveDictionary//import_dictionary");
    when(mockResponse.getWriter()).thenReturn(mockPrintWriter);
    when(UserUtils.getUserSession(mockRequest)).thenReturn(mockUser);
    when(mockUser.getOrgUserId()).thenReturn("testUserId");
    controller.saveDictionaryController(mockRequest, mockResponse);
    verify(mockRequest).getRequestURI();
    verify(mockResponse).getWriter();
    verify(mockUser).getOrgUserId();
    when(mockRequest.getRequestURI()).thenReturn("testRequestURI///saveDictionary");
    controller.saveDictionaryController(mockRequest, mockResponse);
    verify(mockRequest, atLeast(1)).getRequestURI();
}