@Test(expected = ActionDeniedException.class)
public void tesGetWithGuest() throws Exception {

    // mock returned views
    doReturn(Collections.emptyList()).when(viewService).getViewsForUser(anyLong());
    // setup params
    Map<String, String> parameters = new HashMap<String, String>();
    parameters.put(ViewTypes.VIEW_TYPE, ViewTypes.USER);
    final ActionParameters params = createActionParams(parameters);
    assertEquals("Parameter is set correctly", ViewTypes.USER, params.getHttpParam(ViewTypes.VIEW_TYPE));
    verifyResponseNotWritten(params);
    handler.handleAction(params);
}