DocumentrWebSecurityExpressionHandler extends DefaultWebSecurityExpressionHandler { @Override protected SecurityExpressionOperations createSecurityExpressionRoot(Authentication authentication, FilterInvocation fi) { DocumentrSecurityExpressionRoot root = new DocumentrSecurityExpressionRoot(authentication, repoManager); root.setRequest(fi.getRequest()); root.setPermissionEvaluator(getPermissionEvaluator()); return root; }  @PostConstruct void init();  }
@Test public void createSecurityExpressionRootMustCreateDocumentrSecurityExpressionRoot() { DocumentrWebSecurityExpressionHandler expressionHandler = new DocumentrWebSecurityExpressionHandler(); expressionHandler.setPermissionEvaluator(permissionEvaluator); SecurityExpressionOperations root = expressionHandler.createSecurityExpressionRoot( authentication, filterInvocation); assertTrue(root instanceof DocumentrSecurityExpressionRoot); }