@@ -0,0 +1,1662 @@
+package de.terrestris.shogun2.security.access.factory;%0A%0Aimport static org.hamcrest.CoreMatchers.instanceOf;%0Aimport static org.junit.Assert.assertThat;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport de.terrestris.shogun2.model.PersistentObject;%0Aimport de.terrestris.shogun2.model.User;%0Aimport de.terrestris.shogun2.security.access.entity.PersistentObjectPermissionEvaluator;%0Aimport de.terrestris.shogun2.security.access.entity.UserPermissionEvaluator;%0A%0A/**%0A * @author Nils B%C3%BChner%0A *%0A */%0Apublic class EntityPermissionEvaluatorFactoryTest %7B%0A%0A%09@SuppressWarnings(%22rawtypes%22)%0A%09EntityPermissionEvaluatorFactory entityPermissionEvaluatorFactory;%0A%0A%09@Before%0A%09public void setUp() %7B%0A%09%09entityPermissionEvaluatorFactory = new EntityPermissionEvaluatorFactory%3C%3E();%0A%09%7D%0A%0A%09@SuppressWarnings(%7B %22rawtypes%22, %22unchecked%22 %7D)%0A%09@Test%0A%09public void getEntityPermissionEvaluator_shouldReturnUserEvaluatorForUserClass() %7B%0A%09%09Class%3CUser%3E userClass = User.class;%0A%0A%09%09PersistentObjectPermissionEvaluator entityPermissionEvaluator = entityPermissionEvaluatorFactory%0A%09%09%09%09.getEntityPermissionEvaluator(userClass);%0A%0A%09%09assertThat(entityPermissionEvaluator, instanceOf(UserPermissionEvaluator.class));%0A%09%7D%0A%0A%09@SuppressWarnings(%7B %22rawtypes%22, %22unchecked%22 %7D)%0A%09@Test%0A%09public void getEntityPermissionEvaluator_shouldReturnDefaultEvaluatorForPersistentObjects() %7B%0A%09%09Class%3CPersistentObject%3E persistentObjectClass = PersistentObject.class;%0A%0A%09%09PersistentObjectPermissionEvaluator entityPermissionEvaluator = entityPermissionEvaluatorFactory%0A%09%09%09%09.getEntityPermissionEvaluator(persistentObjectClass);%0A%0A%09%09assertThat(entityPermissionEvaluator, instanceOf(PersistentObjectPermissionEvaluator.class));%0A%09%7D%0A%0A%0A%7D%0A

Add tests for EntityPermissionEvaluatorFactory