this.session = mock(Session.class);
when(session.getUser()).thenReturn(user);
this.userDAO = mock(UserDAO.class);
this.resource = new DocumentsResource(userDAO);
this.credentials = mock(Credentials.class);
when(credentials.buildSession(userDAO, "bob")).thenReturn(session);
this.uriInfo = mock(UriInfo.class);