2 * Copyright (C) 2017 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.persistence
.hibenate
.permission
;
11 import java
.util
.ArrayList
;
12 import java
.util
.List
;
14 import org
.junit
.Assert
;
15 import org
.springframework
.security
.authentication
.TestingAuthenticationToken
;
16 import org
.springframework
.security
.core
.Authentication
;
17 import org
.springframework
.security
.core
.GrantedAuthority
;
19 import eu
.etaxonomy
.cdm
.model
.permission
.User
;
20 import eu
.etaxonomy
.cdm
.persistence
.hibernate
.permission
.CdmAuthority
;
23 * @author a.kohlbecker
27 abstract public class AbstractCdmPermissionVoterTest
extends Assert
{
33 protected Authentication
authentication(CdmAuthority
... authorities
) {
35 List
<GrantedAuthority
> ga
= new ArrayList
<>();
37 for(CdmAuthority a
: authorities
){
41 Authentication auth
= new TestingAuthenticationToken(
42 User
.NewInstance("Tester", "secret"),