// null JeevesServlet arg because not running in servlet here
jeeves.init(appPath, configPath, baseUrl, null);
// Make session with all permissions
session = new UserSession();
User user = new User().
setProfile(Profile.Administrator).
setUsername(Profile.Administrator.name()).
setId(0).
setName(Profile.Administrator.name()).
setSurname(Profile.Administrator.name());
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(user.getUsername(), null, user.getAuthorities() ) ;
authentication.setDetails(user);
if(SecurityContextHolder.getContext() == null) {
SecurityContextHolder.createEmptyContext();
}