[BUGFIX] in test env we don't have a HttpServletRequest

So we have to provide the security context in another way.