tests and bean loader hot fix
diff --git a/src/main/resources/default-config.xml b/src/main/resources/default-config.xml
index 1b0c72c..62d5997 100644
--- a/src/main/resources/default-config.xml
+++ b/src/main/resources/default-config.xml
@@ -1,9 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:p="http://www.springframework.org/schema/p"
        xmlns:util="http://www.springframework.org/schema/util"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns="http://www.springframework.org/schema/beans"
+       xmlns:cache="http://www.springframework.org/schema/cache"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
                             http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                             http://www.springframework.org/schema/tx
@@ -15,8 +17,6 @@
                             http://www.springframework.org/schema/util
                             http://www.springframework.org/schema/util/spring-util-4.0.xsd">
 
-    <!--<cache:annotation-driven/>-->
-
     <bean id="props"
           class="org.springframework.beans.factory.config.PropertiesFactoryBean">
         <property name="ignoreResourceNotFound" value="true"/>
@@ -39,14 +39,14 @@
         </property>
     </bean>
 
-    <!--<bean id='cacheManager'-->
-    <!--class='org.springframework.cache.ehcache.EhCacheCacheManager'-->
-    <!--p:cacheManager-ref='ehcache'/>-->
+    <bean id='cacheManager'
+          class='org.springframework.cache.ehcache.EhCacheCacheManager'
+          p:cacheManager-ref='ehcache'/>
 
-    <!--<bean id='ehcache'-->
-    <!--class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'-->
-    <!--p:configLocation='classpath:ehcache.xml'-->
-    <!--p:shared='true'/>-->
+    <bean id='ehcache'
+          class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'
+          p:configLocation='classpath:ehcache.xml'
+          p:shared='true'/>
 
     <!-- props are injected from default-config.xml -->
     <bean id="kustvakt_config"
@@ -87,16 +87,6 @@
         <property name="database" value="${jdbc.database}"/>
     </bean>
 
-    <bean id="kustvakt_userdetails"
-          class="de.ids_mannheim.korap.handlers.UserDetailsDao">
-        <constructor-arg ref="kustvakt_db"/>
-    </bean>
-
-    <bean id="kustvakt_usersettings"
-          class="de.ids_mannheim.korap.handlers.UserSettingsDao">
-        <constructor-arg ref="kustvakt_db"/>
-    </bean>
-
     <bean id="kustvakt_auditing"
           class="de.ids_mannheim.korap.handlers.JDBCAuditing">
         <constructor-arg ref="kustvakt_db"/>
@@ -107,18 +97,16 @@
         <constructor-arg ref="kustvakt_db"/>
     </bean>
 
-    <!--fixme: change name according to convention -->
-    <!--<bean id="collectionProvider"-->
-    <!--class="de.ids_mannheim.korap.handlers.CollectionDao">-->
-    <!--<constructor-arg ref="kustvakt_db"/>-->
-    <!--</bean>-->
-
-    <!--fixme: change name according to convention -->
-    <bean id="resourceProvider"
+    <bean id="resource_provider"
           class="de.ids_mannheim.korap.handlers.ResourceDao">
         <constructor-arg ref="kustvakt_db"/>
     </bean>
 
+    <bean id="document_provider"
+          class="de.ids_mannheim.korap.handlers.DocumentDao">
+        <constructor-arg ref="kustvakt_db"/>
+    </bean>
+
     <bean id="kustvakt_policies"
           class="de.ids_mannheim.korap.security.ac.PolicyDao">
         <constructor-arg ref="kustvakt_db"/>
@@ -173,13 +161,12 @@
     <bean id="userdata_details"
           class="de.ids_mannheim.korap.handlers.UserDetailsDao">
         <constructor-arg
-                type="de.ids_mannheim.korap.interfaces.db.PersistenceClient"
                 ref="kustvakt_db"/>
     </bean>
+
     <bean id="userdata_settings"
-          class="de.ids_mannheim.korap.handlers.UserDetailsDao">
+          class="de.ids_mannheim.korap.handlers.UserSettingsDao">
         <constructor-arg
-                type="de.ids_mannheim.korap.interfaces.db.PersistenceClient"
                 ref="kustvakt_db"/>
     </bean>
 
@@ -189,6 +176,13 @@
         <ref bean="userdata_settings"/>
     </util:list>
 
+
+    <util:list id="kustvakt_resources"
+               value-type="de.ids_mannheim.korap.interfaces.db.ResourceOperationIface">
+        <ref bean="document_provider"/>
+        <ref bean="resource_provider"/>
+    </util:list>
+
     <!-- specify type for constructor argument -->
     <bean id="kustvakt_authenticationmanager"
           class="de.ids_mannheim.korap.security.auth.KustvaktAuthenticationManager">