diff --git a/full/Changes b/full/Changes
index c9be960..3532fcd 100644
--- a/full/Changes
+++ b/full/Changes
@@ -1,6 +1,8 @@
 # version 0.61.5
-17/11/2018
+17/12/2018
    - Added a search timeout test (margaretha)
+18/12/2018
+   - Updated tests using BeanConfigTest to use SpringJerseyTest (margaretha)
 
 # version 0.61.4
 14/11/2018
diff --git a/full/src/main/resources/log4j2.properties b/full/src/main/resources/log4j2.properties
index 1acd50c..c4762c2 100644
--- a/full/src/main/resources/log4j2.properties
+++ b/full/src/main/resources/log4j2.properties
@@ -11,6 +11,6 @@
 appender.mainFile.layout.pattern= %d{yyyy-MM-dd, HH:mm:ss} %C{6} - %M%n %-5p: %m%n
 
 rootLogger.level = warn
-rootLogger.appenderRefs = mainFile
+rootLogger.appenderRefs = console,mainFile
 rootLogger.appenderRef.file.ref = MAINLOG
-rootLogger.additivity=false
\ No newline at end of file
+rootLogger.additivity=true
\ No newline at end of file
diff --git a/full/src/test/java/de/ids_mannheim/korap/config/NamedVCLoaderTest.java b/full/src/test/java/de/ids_mannheim/korap/cache/NamedVCLoaderTest.java
similarity index 91%
rename from full/src/test/java/de/ids_mannheim/korap/config/NamedVCLoaderTest.java
rename to full/src/test/java/de/ids_mannheim/korap/cache/NamedVCLoaderTest.java
index 3fef08f..7e3736a 100644
--- a/full/src/test/java/de/ids_mannheim/korap/config/NamedVCLoaderTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/cache/NamedVCLoaderTest.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.config;
+package de.ids_mannheim.korap.cache;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -10,6 +10,8 @@
 
 import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.collection.CachedVCData;
+import de.ids_mannheim.korap.config.NamedVCLoader;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.dao.VirtualCorpusDao;
 import de.ids_mannheim.korap.entity.VirtualCorpus;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
diff --git a/full/src/test/java/de/ids_mannheim/korap/config/BeanConfigBaseTest.java b/full/src/test/java/de/ids_mannheim/korap/config/BeanConfigBaseTest.java
deleted file mode 100644
index b69cecf..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/config/BeanConfigBaseTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package de.ids_mannheim.korap.config;
-
-import static org.junit.Assert.assertNotNull;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.junit.runner.RunWith;
-import org.junit.runner.notification.RunNotifier;
-import org.junit.runners.model.InitializationError;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationContext;
-import org.springframework.test.annotation.DirtiesContext;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import net.jcip.annotations.NotThreadSafe;
-
-/**
- * @author hanl
- * @date 09/03/2016
- */
-@Deprecated
-@NotThreadSafe
-@RunWith(BeanConfigBaseTest.SpringExtendedSetupListener.class)
-@ContextConfiguration("classpath:test-config.xml")
-@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
-public abstract class BeanConfigBaseTest {
-
-    private static Logger jlog = LogManager.getLogger(BeanConfigBaseTest.class);
-    @Autowired
-    protected ApplicationContext context;
-    
-    public void init () throws Exception {
-        assertNotNull("Application context must not be null!", this.context);
-        jlog.debug("running one-time before init for class "
-                + this.getClass().getSimpleName() + " ...");
-        BeansFactory.setKustvaktContext(getContext());
-        assertNotNull(BeansFactory.getKustvaktContext());
-        initMethod();
-    }
-
-    protected abstract ContextHolder getContext();
-
-    public abstract void initMethod () throws KustvaktException;
-    
-    public void close () {
-        BeansFactory.closeApplication();
-    }
-
-    public static class SpringExtendedSetupListener extends
-            SpringJUnit4ClassRunner {
-
-        private BeanConfigBaseTest instanceSetupListener;
-
-
-        public SpringExtendedSetupListener (Class<?> clazz)
-                throws InitializationError {
-            super(clazz);
-        }
-
-
-        @Override
-        protected Object createTest () throws Exception {
-            Object test = super.createTest();
-            // Note that JUnit4 will call this createTest() multiple times for each
-            // test method, so we need to ensure to call "beforeClassSetup" only once.
-            if (test instanceof BeanConfigBaseTest && instanceSetupListener == null) {
-                instanceSetupListener = (BeanConfigBaseTest) test;
-                instanceSetupListener.init();
-            }
-            return test;
-        }
-
-
-        @Override
-        public void run (RunNotifier notifier) {
-            super.run(notifier);
-            if (instanceSetupListener != null){
-                instanceSetupListener.close();
-            }
-        }
-    }
-}
diff --git a/full/src/test/java/de/ids_mannheim/korap/config/TestBeans.java b/full/src/test/java/de/ids_mannheim/korap/config/TestBeans.java
deleted file mode 100644
index 7994ef5..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/config/TestBeans.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package de.ids_mannheim.korap.config;
-
-import java.util.List;
-
-import de.ids_mannheim.korap.authentication.AuthenticationManager;
-import de.ids_mannheim.korap.interfaces.EncryptionIface;
-import de.ids_mannheim.korap.interfaces.EntityHandlerIface;
-import de.ids_mannheim.korap.interfaces.db.AuditingIface;
-import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
-
-/**
- * @author hanl
- * @date 20/02/2016
- */
-public interface TestBeans {
-
-//	public  KustvaktConfiguration getConfig();
-
-	public  EntityHandlerIface getUserDao();
-	
-	public  AuditingIface getAuditingDao();
-
-	public  List<UserDataDbIface> getUserdataDaos();
-
-	public  EncryptionIface getCrypto();
-
-	public  AuthenticationManager getAuthManager();
-
-}
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/ClassLoaderTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/ClassLoaderTest.java
index cae64f1..9523bf6 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/ClassLoaderTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/ClassLoaderTest.java
@@ -4,11 +4,11 @@
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
-import de.ids_mannheim.korap.config.BeanConfigTest;
 import de.ids_mannheim.korap.config.ContextHolder;
 import de.ids_mannheim.korap.config.DefaultHandler;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.handlers.JDBCAuditing;
 import de.ids_mannheim.korap.interfaces.db.AuditingIface;
 
@@ -16,8 +16,11 @@
  * @author hanl
  * @date 27/07/2015
  */
-public class ClassLoaderTest extends BeanConfigTest {
+public class ClassLoaderTest extends SpringJerseyTest {
 
+    @Autowired
+    AuditingIface audit;
+    
     @Test
     public void testDefaultCreationThrowsNoException () {
         DefaultHandler pl = new DefaultHandler();
@@ -26,25 +29,9 @@
         assertTrue(o instanceof AuditingIface);
     }
 
-
-//    @Test
-//    @Deprecated
-//    public void testDefaultCreation2ThrowsNoException () {
-//        AuthenticationManagerIface iface = helper().getContext()
-//                .getAuthenticationManager();
-//        assertNotNull(iface);
-//        assertTrue(iface instanceof KustvaktAuthenticationManager);
-//    }
-
-
     @Test
     public void testDefaultInterfaceMatchThrowsNoException () {
-        AuditingIface iface = helper().getContext().getAuditingProvider();
-        assertNotNull(iface);
-        assertTrue(iface instanceof JDBCAuditing);
+        assertNotNull(audit);
+        assertTrue(audit instanceof JDBCAuditing);
     }
-
-
-    @Override
-    public void initMethod () throws KustvaktException {}
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/ConfigTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/ConfigTest.java
index 734f78c..bd56477 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/ConfigTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/ConfigTest.java
@@ -6,27 +6,25 @@
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.URISyntaxException;
-import java.util.Map;
 import java.util.Properties;
 
-import org.junit.Ignore;
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
-import de.ids_mannheim.korap.config.BeanConfigTest;
 import de.ids_mannheim.korap.config.ConfigLoader;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.interfaces.EncryptionIface;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.utils.ServiceInfo;
 import de.ids_mannheim.korap.utils.TimeUtils;
 
-/** EM: To do: fix tests
+/** 
  * @author hanl
  * @date 02/09/2015
  */
-@Ignore
-public class ConfigTest extends BeanConfigTest {
+public class ConfigTest extends SpringJerseyTest {
 
+    @Autowired
+    KustvaktConfiguration config;
 
     @Test
     public void testConfigLoader () {
@@ -52,32 +50,11 @@
 
     @Test
     public void testProperties () {
-        assertEquals("token layer does not match", "opennlp", helper()
-                .getContext().getConfiguration().getDefault_token());
+        assertEquals("token layer does not match", "opennlp", config.getDefault_token());
         assertEquals("token expiration does not match",
-                TimeUtils.convertTimeToSeconds("1D"), helper().getContext()
-                        .getConfiguration().getLongTokenTTL());
+                TimeUtils.convertTimeToSeconds("1D"), config.getLongTokenTTL());
     }
 
 
-    @Test(expected = KustvaktException.class)
-    @Ignore
-    public void testBeanOverrideInjection () throws Exception {
-        helper().getContext()
-                .getConfiguration()
-                .setPropertiesAsStream(
-                        ConfigTest.class.getClassLoader().getResourceAsStream(
-                                "kustvakt.conf"));
-    }
-
-    @Test
-    public void testBootConfigDependencyOrder () {
-        // todo:
-
-    }
-
-    @Override
-    public void initMethod () throws KustvaktException {
-
-    }
+   
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/FileAuditingTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/FileAuditingTest.java
index 188c36a..4fc673b 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/FileAuditingTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/FileAuditingTest.java
@@ -1,44 +1,38 @@
 package de.ids_mannheim.korap.misc;
+
 import java.util.Date;
 
 import org.joda.time.LocalDate;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import de.ids_mannheim.korap.auditing.AuditRecord;
-import de.ids_mannheim.korap.config.BeanConfigTest;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
+import de.ids_mannheim.korap.interfaces.db.AuditingIface;
+import de.ids_mannheim.korap.interfaces.defaults.DefaultAuditing;
 
 /**
  * @author hanl
  * @date 27/07/2015
  */
-//todo: test audit commit in thread and that no concurrency issue arrises
-public class FileAuditingTest extends BeanConfigTest {
-
-    @Override
-    public void initMethod () throws KustvaktException {
-
-    }
-
+// todo: test audit commit in thread and that no concurrency issue
+// arrises
+public class FileAuditingTest {
 
     @Test
     public void testAdd () {
+        AuditingIface auditor = new DefaultAuditing();
         for (int i = 0; i < 20; i++) {
             AuditRecord record = AuditRecord.serviceRecord("MichaelHanl",
                     StatusCodes.ILLEGAL_ARGUMENT, String.valueOf(i),
                     "string value");
-            helper().getContext().getAuditingProvider().audit(record);
+            auditor.audit(record);
         }
     }
 
-
-    @Ignore
-    @Test (expected = UnsupportedOperationException.class)
+    @Test(expected = UnsupportedOperationException.class)
     public void testRetrieval () {
-        helper().getContext().getAuditingProvider()
-                .retrieveRecords(new LocalDate(new Date().getTime()), 10);
+        AuditingIface auditor = new DefaultAuditing();
+        auditor.retrieveRecords(new LocalDate(new Date().getTime()), 10);
     }
 
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
index 52b331a..ab5039e 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
@@ -3,12 +3,14 @@
 
 import java.io.IOException;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import javax.annotation.PostConstruct;
+
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import de.ids_mannheim.korap.KrillCollection;
-import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.CollectionQueryProcessor;
 import de.ids_mannheim.korap.utils.JsonUtils;
@@ -19,27 +21,26 @@
  * @author hanl
  * @date 14/01/2016
  */
-public class LocalQueryTest extends BeanConfigTest {
+public class LocalQueryTest extends SpringJerseyTest {
 
     private static String index;
-    private static String qstring;
 
+    @Autowired
+    KustvaktConfiguration config;
 
-    @BeforeClass
-    public static void setup () throws Exception {
-        qstring = "creationDate since 1786 & creationDate until 1788";
-        //        qstring = "creationDate since 1765 & creationDate until 1768";
-        //        qstring = "textType = Aphorismus";
-        //        qstring = "title ~ \"Werther\"";
+    @PostConstruct
+    public void setup () throws Exception {
+        index = config.getIndexDir();
     }
 
 
-    @AfterClass
-    public static void drop () {}
-
-
     @Test
     public void testQuery () throws KustvaktException {
+        String qstring = "creationDate since 1786 & creationDate until 1788";
+        //        qstring = "creationDate since 1765 & creationDate until 1768";
+        //        qstring = "textType = Aphorismus";
+        //        qstring = "title ~ \"Werther\"";
+        
         SearchKrill krill = new SearchKrill(index);
         KoralCollectionQueryBuilder coll = new KoralCollectionQueryBuilder();
         coll.with(qstring);
@@ -73,14 +74,4 @@
         assertNotNull(docs);
     }
 
-
-    @Test
-    public void testQueryHash () {}
-
-
-    @Override
-    public void initMethod () throws KustvaktException {
-//        helper().runBootInterfaces();
-        index = helper().getContext().getConfiguration().getIndexDir();
-    }
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
index 28bab56..e055529 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
@@ -4,10 +4,12 @@
 import static org.junit.Assert.assertNotNull;
 
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.fasterxml.jackson.databind.JsonNode;
 
-import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.config.TestVariables;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
@@ -20,19 +22,15 @@
  * @author hanl
  * @date 03/09/2015
  */
-public class CollectionRewriteTest extends BeanConfigTest {
+public class CollectionRewriteTest extends SpringJerseyTest {
 
-    @Override
-    public void initMethod () throws KustvaktException {
-//        helper().runBootInterfaces();
-    }
-
-
+    @Autowired
+    public KustvaktConfiguration config;
+    
     @Test
     public void testCollectionNodeRemoveCorpusIdNoErrors ()
             throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
@@ -54,8 +52,7 @@
     @Test
     public void testCollectionNodeRemoveAllCorpusIdNoErrors ()
             throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
@@ -75,8 +72,7 @@
     @Test
     public void testCollectionNodeRemoveGroupedCorpusIdNoErrors ()
             throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
@@ -99,8 +95,7 @@
     @Test
     public void testCollectionCleanEmptyDocGroupNoErrors ()
             throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionConstraint.class);
         handler.add(CollectionCleanRewrite.class);
         QuerySerializer s = new QuerySerializer();
@@ -128,8 +123,7 @@
     @Test
     public void testCollectionCleanMoveOneDocFromGroupUpNoErrors ()
             throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionConstraint.class);
         handler.add(CollectionCleanRewrite.class);
         QuerySerializer s = new QuerySerializer();
@@ -150,8 +144,7 @@
     @Test
     public void testCollectionCleanEmptyGroupAndMoveOneFromGroupUpNoErrors ()
             throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionConstraint.class);
         handler.add(CollectionCleanRewrite.class);
         QuerySerializer s = new QuerySerializer();
@@ -172,8 +165,7 @@
     @Test
     public void testCollectionRemoveAndMoveOneFromGroupUpNoErrors ()
             throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionConstraint.class);
         handler.add(CollectionCleanRewrite.class);
         QuerySerializer s = new QuerySerializer();
@@ -196,8 +188,7 @@
 
     @Test
     public void testPublicCollectionRewriteEmptyAdd () throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionRewrite.class);
 
         QuerySerializer s = new QuerySerializer();
@@ -221,8 +212,7 @@
     @Test
     public void testPublicCollectionRewriteNonEmptyAdd ()
             throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionRewrite.class);
 
         QuerySerializer s = new QuerySerializer();
@@ -251,8 +241,7 @@
 
     @Test
     public void testRemoveCorpusFromDifferentGroups () throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(TestVariables.SIMPLE_ADD_QUERY, "poliqarp");
@@ -277,8 +266,7 @@
     @Test
     public void testRemoveOneCorpusAndMoveDocFromTwoGroups ()
             throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         handler.add(CollectionConstraint.class);
         // todo: use this collection query also to test clean up filter! after reduction of corpusSigle (wiss | freizeit)!
         handler.add(CollectionCleanRewrite.class);
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java
index 98828da..f159049 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java
@@ -5,22 +5,17 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import org.junit.Ignore;
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.fasterxml.jackson.databind.JsonNode;
 
-import de.ids_mannheim.korap.config.Attributes;
-import de.ids_mannheim.korap.config.BeanConfigTest;
-import de.ids_mannheim.korap.config.BeansFactory;
-import de.ids_mannheim.korap.config.ContextHolder;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
 import de.ids_mannheim.korap.resource.LayerMapper;
-import de.ids_mannheim.korap.user.User;
-import de.ids_mannheim.korap.user.UserSettings;
+import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 /**
@@ -28,7 +23,7 @@
  * @date 18/06/2015
  */
 //todo: check position and information of rewrites!
-public class FoundryRewriteTest extends BeanConfigTest {
+public class FoundryRewriteTest extends SpringJerseyTest {
 
     private static String simple_add_query = "[pos=ADJA]";
     private static String simple_rewrite_query = "[base=Haus]";
@@ -36,16 +31,11 @@
     private static String complex_rewrite_query2 = "[orth=laufe/i & base!=Lauf]";
     private static String complex_rewrite_query3 = "[(base=laufen | base=gehen) & tt/pos=VVFIN]";
 
-    private static KustvaktConfiguration config;
-
-
-    @Override
-    public void initMethod () throws KustvaktException {
-        config = helper().getContext().getConfiguration();
-//        helper().setupAccount();
-    }
-
-
+    @Autowired
+    public KustvaktConfiguration config;
+    @Autowired
+    public RewriteHandler handler; 
+    
     @Test
     public void testDefaultLayerMapperThrowsNoException () {
         LayerMapper m = new LayerMapper(config);
@@ -58,25 +48,17 @@
     }
 
 
-    @Ignore
-    @Deprecated
     @Test
     public void testDefaultFoundryInjectLemmaThrowsNoError ()
             throws KustvaktException {
 
-        KustvaktConfiguration c = helper().getBean(
-                ContextHolder.KUSTVAKT_CONFIG);
-
-        RewriteHandler processor = new RewriteHandler();
-        processor.insertBeans(helper().getContext());
-        processor.add(FoundryInject.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=Haus]", "poliqarp");
-        String result = processor.processQuery(s.toJSON(), null);
+        String result = handler.processQuery(s.toJSON(), new KorAPUser());
         JsonNode node = JsonUtils.readTree(result);
         assertNotNull(node);
         assertFalse(node.at("/query/wrap/foundry").isMissingNode());
-        assertEquals(c.getDefault_lemma(), node.at("/query/wrap/foundry")
+        assertEquals(config.getDefault_lemma(), node.at("/query/wrap/foundry")
                 .asText());
         assertEquals("lemma", node.at("/query/wrap/layer").asText());
         assertFalse(node.at("/query/wrap/rewrites").isMissingNode());
@@ -88,20 +70,14 @@
     @Test
     public void testDefaultFoundryInjectPOSNoErrors () throws KustvaktException {
 
-        KustvaktConfiguration c = helper().getBean(
-                ContextHolder.KUSTVAKT_CONFIG);
-
         QuerySerializer s = new QuerySerializer();
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
         s.setQuery("[pos=ADJA]", "poliqarp");
-        assertTrue(handler.add(FoundryInject.class));
-        String result = handler.processQuery(s.toJSON(), null);
+        String result = handler.processQuery(s.toJSON(), new KorAPUser());
         JsonNode node = JsonUtils.readTree(result);
 
         assertNotNull(node);
         assertFalse(node.at("/query/wrap/foundry").isMissingNode());
-        assertEquals(c.getDefault_pos(), node.at("/query/wrap/foundry")
+        assertEquals(config.getDefault_pos(), node.at("/query/wrap/foundry")
                 .asText());
         assertEquals("pos", node.at("/query/wrap/layer").asText());
         assertFalse(node.at("/query/wrap/rewrites").isMissingNode());
@@ -111,82 +87,77 @@
     }
 
     // EM: Fix me usersetting
-    @Test
-    @Ignore
-    public void testRewriteFoundryInjectPOSThrowsNoError ()
-            throws KustvaktException {
-        User user = helper().getUser();
-
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
-        handler.add(FoundryInject.class);
-        QuerySerializer s = new QuerySerializer();
-        s.setQuery("[pos=ADJA]", "poliqarp");
-        String result = handler.processQuery(s.toJSON(), user);
-        JsonNode node = JsonUtils.readTree(result);
-
-        UserDataDbIface dao = BeansFactory.getTypeFactory()
-                .getTypeInterfaceBean(
-                        helper().getContext().getUserDataProviders(),
-                        UserSettings.class);
-        UserSettings settings = (UserSettings) dao.get(user);
-        assertTrue(settings.isValid());
-        String pos = (String) settings.get(Attributes.DEFAULT_POS_FOUNDRY);
-
-        assertNotNull(node);
-        assertEquals("pos", node.at("/query/wrap/layer").asText());
-        assertEquals(pos, node.at("/query/wrap/foundry").asText());
-        assertFalse(node.at("/query/wrap/rewrites").isMissingNode());
-        assertEquals("koral:rewrite", node.at("/query/wrap/rewrites/0/@type")
-                .asText());
-    }
+//    @Test
+//    @Ignore
+//    public void testRewriteFoundryInjectPOSThrowsNoError ()
+//            throws KustvaktException {
+//        User user = helper().getUser();
+//
+//        RewriteHandler handler = new RewriteHandler();
+//        handler.insertBeans(helper().getContext());
+//        handler.add(FoundryInject.class);
+//        QuerySerializer s = new QuerySerializer();
+//        s.setQuery("[pos=ADJA]", "poliqarp");
+//        String result = handler.processQuery(s.toJSON(), user);
+//        JsonNode node = JsonUtils.readTree(result);
+//
+//        UserDataDbIface dao = BeansFactory.getTypeFactory()
+//                .getTypeInterfaceBean(
+//                        helper().getContext().getUserDataProviders(),
+//                        UserSettings.class);
+//        UserSettings settings = (UserSettings) dao.get(user);
+//        assertTrue(settings.isValid());
+//        String pos = (String) settings.get(Attributes.DEFAULT_POS_FOUNDRY);
+//
+//        assertNotNull(node);
+//        assertEquals("pos", node.at("/query/wrap/layer").asText());
+//        assertEquals(pos, node.at("/query/wrap/foundry").asText());
+//        assertFalse(node.at("/query/wrap/rewrites").isMissingNode());
+//        assertEquals("koral:rewrite", node.at("/query/wrap/rewrites/0/@type")
+//                .asText());
+//    }
 
     // EM: Fix me usersetting
-    @Test
-    @Ignore
-    public void testRewriteFoundryInjectLemmaThrowsNoError ()
-            throws KustvaktException {
-        KustvaktConfiguration c = helper().getBean(
-                ContextHolder.KUSTVAKT_CONFIG);
-        User user = helper().getUser();
-
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
-        handler.add(FoundryInject.class);
-        QuerySerializer s = new QuerySerializer();
-        s.setQuery("[base=Haus]", "poliqarp");
-        String result = handler.processQuery(s.toJSON(), user);
-        JsonNode node = JsonUtils.readTree(result);
-
-        UserDataDbIface dao = BeansFactory.getTypeFactory()
-                .getTypeInterfaceBean(
-                        helper().getContext().getUserDataProviders(),
-                        UserSettings.class);
-        UserSettings settings = (UserSettings) dao.get(user);
-        assertTrue(settings.isValid());
-        String lemma = (String) settings.get(Attributes.DEFAULT_LEMMA_FOUNDRY);
-
-        assertNotNull(node);
-        assertEquals("lemma", node.at("/query/wrap/layer").asText());
-        assertEquals(lemma, node.at("/query/wrap/foundry").asText());
-        assertFalse(node.at("/query/wrap/rewrites").isMissingNode());
-        assertEquals("koral:rewrite", node.at("/query/wrap/rewrites/0/@type")
-                .asText());
-    }
+//    @Test
+//    @Ignore
+//    public void testRewriteFoundryInjectLemmaThrowsNoError ()
+//            throws KustvaktException {
+//        KustvaktConfiguration c = helper().getBean(
+//                ContextHolder.KUSTVAKT_CONFIG);
+//        User user = helper().getUser();
+//
+//        RewriteHandler handler = new RewriteHandler();
+//        handler.insertBeans(helper().getContext());
+//        handler.add(FoundryInject.class);
+//        QuerySerializer s = new QuerySerializer();
+//        s.setQuery("[base=Haus]", "poliqarp");
+//        String result = handler.processQuery(s.toJSON(), user);
+//        JsonNode node = JsonUtils.readTree(result);
+//
+//        UserDataDbIface dao = BeansFactory.getTypeFactory()
+//                .getTypeInterfaceBean(
+//                        helper().getContext().getUserDataProviders(),
+//                        UserSettings.class);
+//        UserSettings settings = (UserSettings) dao.get(user);
+//        assertTrue(settings.isValid());
+//        String lemma = (String) settings.get(Attributes.DEFAULT_LEMMA_FOUNDRY);
+//
+//        assertNotNull(node);
+//        assertEquals("lemma", node.at("/query/wrap/layer").asText());
+//        assertEquals(lemma, node.at("/query/wrap/foundry").asText());
+//        assertFalse(node.at("/query/wrap/rewrites").isMissingNode());
+//        assertEquals("koral:rewrite", node.at("/query/wrap/rewrites/0/@type")
+//                .asText());
+//    }
 
 
     @Test
     public void testFoundryInjectJoinedQueryNoErrors ()
             throws KustvaktException {
-        KustvaktConfiguration c = helper().getBean(
-                ContextHolder.KUSTVAKT_CONFIG);
 
         QuerySerializer s = new QuerySerializer();
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
         s.setQuery("[orth=laufe/i & base!=Lauf]", "poliqarp");
-        assertTrue(handler.add(FoundryInject.class));
-        String result = handler.processQuery(s.toJSON(), null);
+        String result = handler.processQuery(s.toJSON(), new KorAPUser());
         JsonNode node = JsonUtils.readTree(result);
 
         assertNotNull(node);
@@ -202,11 +173,8 @@
     public void testFoundryInjectGroupedQueryNoErrors ()
             throws KustvaktException {
         QuerySerializer s = new QuerySerializer();
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
         s.setQuery("[(base=laufen | tt/pos=VVFIN)]", "poliqarp");
-        assertTrue(handler.add(FoundryInject.class));
-        String result = handler.processQuery(s.toJSON(), null);
+        String result = handler.processQuery(s.toJSON(), new KorAPUser());
         JsonNode node = JsonUtils.readTree(result);
 //        System.out.println("NODDE "+ node);
         assertNotNull(node);
@@ -220,29 +188,18 @@
     }
 
     @Test
-    @Ignore
-    public void testFoundyBaseRewrite() throws KustvaktException {
+    public void testFoundryBaseRewrite() throws KustvaktException {
         QuerySerializer s = new QuerySerializer();
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
         s.setQuery("[orth=laufen]", "poliqarp");
-        assertTrue(handler.add(FoundryInject.class));
-        String result = handler.processQuery(s.toJSON(), null);
+        String result = handler.processQuery(s.toJSON(), new KorAPUser());
         JsonNode node = JsonUtils.readTree(result);
-//        System.out.println("NODDE "+ node);
-        assertNotNull(node);
-        assertEquals("koral:termGroup", node.at("/query/wrap/@type").asText());
-        assertFalse(node.at("/query/wrap/operands/0/operands/0/foundry")
+        System.out.println("NODE "+ node);
+//        assertNotNull(node);
+        assertEquals("koral:term", node.at("/query/wrap/@type").asText());
+        assertFalse(node.at("/query/wrap/foundry")
                 .isMissingNode());
-        assertFalse(node.at("/query/wrap/operands/0/operands/0/rewrites")
+        assertFalse(node.at("/query/wrap/rewrites")
                 .isMissingNode());
-        assertFalse(node.at("/query/wrap/operands/0/operands/1/foundry")
-                .isMissingNode());
-        assertFalse(node.at("/query/wrap/operands/0/operands/1/rewrites")
-                .isMissingNode());
-
-        assertFalse(node.at("/query/wrap/operands/1/foundry").isMissingNode());
-        assertTrue(node.at("/query/wrap/operands/1/rewrites").isMissingNode());
     }
 
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java
index 65ae668..ed8f4a3 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java
@@ -5,31 +5,36 @@
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.fasterxml.jackson.databind.JsonNode;
 
-import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
+import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 /**
  * @author hanl
  * @date 21/10/2015
  */
-public class IdRewriteTest extends BeanConfigTest {
+public class IdRewriteTest extends SpringJerseyTest {
 
+    @Autowired
+    private KustvaktConfiguration config;
+    
     @Test
     public void insertTokenId () throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         assertTrue(handler.add(IdWriter.class));
 
         String query = "[surface=Wort]";
         QuerySerializer s = new QuerySerializer();
         s.setQuery(query, "poliqarp");
 
-        String value = handler.processQuery(s.toJSON(), null);
+        String value = handler.processQuery(s.toJSON(), new KorAPUser());
         JsonNode result = JsonUtils.readTree(value);
 
         assertNotNull(result);
@@ -39,13 +44,12 @@
 
     @Test
     public void testIdWriterTest () throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         assertTrue(handler.add(IdWriter.class));
 
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=Haus]", "poliqarp");
-        String result = handler.processQuery(s.toJSON(), null);
+        String result = handler.processQuery(s.toJSON(), new KorAPUser());
         JsonNode node = JsonUtils.readTree(result);
         assertNotNull(node);
         assertFalse(node.at("/query/wrap").isMissingNode());
@@ -53,8 +57,4 @@
     }
 
 
-    @Override
-    public void initMethod () throws KustvaktException {
-
-    }
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/ResultRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/ResultRewriteTest.java
index 32deec8..2fe92d8 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/ResultRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/ResultRewriteTest.java
@@ -3,8 +3,9 @@
 import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
-import de.ids_mannheim.korap.config.BeanConfigTest;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.config.TestVariables;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.rewrite.CollectionRewrite;
@@ -14,17 +15,13 @@
  * @author hanl
  * @date 12/11/2015
  */
-public class ResultRewriteTest extends BeanConfigTest {
+public class ResultRewriteTest extends SpringJerseyTest {
 
-    @Override
-    public void initMethod () throws KustvaktException {
-
-    }
-
+    @Autowired
+    public RewriteHandler ha;
+    
     @Test
     public void testPostRewriteNothingToDo () throws KustvaktException {
-        RewriteHandler ha = new RewriteHandler();
-        ha.insertBeans(helper().getContext());
         assertEquals("Handler could not be added to rewrite handler instance!",
                 true, ha.add(CollectionRewrite.class));
 
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
index 67f74bd..30ecd1f 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
@@ -1,22 +1,18 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import org.junit.Ignore;
 import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
 
 import com.fasterxml.jackson.databind.JsonNode;
 
-import de.ids_mannheim.korap.config.Attributes;
-import de.ids_mannheim.korap.config.BeanConfigTest;
-import de.ids_mannheim.korap.config.BeansFactory;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.user.UserSettings;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 /** EM: to do: Fix tests
@@ -25,12 +21,14 @@
  * @author hanl
  * @date 21/10/2015
  */
-public class RewriteHandlerTest extends BeanConfigTest {
+public class RewriteHandlerTest extends SpringJerseyTest {
 
+    @Autowired
+    private KustvaktConfiguration config;
+    
     @Test
     public void testRewriteTaskAdd () {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         assertTrue(handler.add(FoundryInject.class));
         assertTrue(handler.add(CollectionCleanRewrite.class));
         assertTrue(handler.add(IdWriter.class));
@@ -50,8 +48,7 @@
 
     @Test
     public void testRewriteNoBeanInject () throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler(helper().getContext()
-                .getConfiguration());
+        RewriteHandler handler = new RewriteHandler(config);
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
         assertTrue(handler.add(FoundryInject.class));
@@ -61,8 +58,7 @@
     
     @Test
     public void testRewriteBeanInject () throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
+        RewriteHandler handler = new RewriteHandler(config);
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=laufen | tt/pos=VVFIN]", "poliqarp");
         assertTrue(handler.add(FoundryInject.class));
@@ -76,26 +72,25 @@
     }
 
     // EM: Fix me usersetting
-    @Test
-    @Ignore
-    public void testRewriteUserSpecific () throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler();
-        handler.insertBeans(helper().getContext());
-        QuerySerializer s = new QuerySerializer();
-        s.setQuery("[base=laufen|tt/pos=VFIN]", "poliqarp");
-        assertTrue(handler.add(FoundryInject.class));
-        String res = handler.processQuery(s.toJSON(), helper().getUser());
-        JsonNode node = JsonUtils.readTree(res);
-        assertNotNull(node);
-        assertEquals("tt_test",
-                node.at("/query/wrap/operands/0/foundry").asText());
-        assertNotEquals("tt_test",
-                node.at("/query/wrap/operands/1/foundry").asText());
-    }
+//    @Test
+//    @Ignore
+//    public void testRewriteUserSpecific () throws KustvaktException {
+//        RewriteHandler handler = new RewriteHandler(config);
+//        QuerySerializer s = new QuerySerializer();
+//        s.setQuery("[base=laufen|tt/pos=VFIN]", "poliqarp");
+//        assertTrue(handler.add(FoundryInject.class));
+//        String res = handler.processQuery(s.toJSON(), helper().getUser());
+//        JsonNode node = JsonUtils.readTree(res);
+//        assertNotNull(node);
+//        assertEquals("tt_test",
+//                node.at("/query/wrap/operands/0/foundry").asText());
+//        assertNotEquals("tt_test",
+//                node.at("/query/wrap/operands/1/foundry").asText());
+//    }
 
  // EM: Fix me usersetting
-    @Override
-    public void initMethod () throws KustvaktException {
+//    @Override
+//    public void initMethod () throws KustvaktException {
 //        helper().setupAccount();
 //        UserDataDbIface settingsdao = BeansFactory.getTypeFactory()
 //                .getTypeInterfaceBean(
@@ -105,7 +100,7 @@
 //        UserSettings s = (UserSettings) settingsdao.get(helper().getUser());
 //        s.setField(Attributes.DEFAULT_LEMMA_FOUNDRY, "tt_test");
 //        settingsdao.update(s);
-    }
+//    }
 
 
 
diff --git a/full/src/test/java/de/ids_mannheim/korap/user/UserFactoryTest.java b/full/src/test/java/de/ids_mannheim/korap/user/UserFactoryTest.java
deleted file mode 100644
index 51d03cb..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/user/UserFactoryTest.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package de.ids_mannheim.korap.user;
-
-/**
- * @author hanl
- * @date 04/02/2016
- */
-public class UserFactoryTest {}
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/ApiVersionTest.java b/full/src/test/java/de/ids_mannheim/korap/web/ApiVersionTest.java
index 92400e6..87d62ad 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/ApiVersionTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/ApiVersionTest.java
@@ -14,6 +14,10 @@
 import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 
+/**
+ * @author margaretha
+ *
+ */
 public class ApiVersionTest extends SpringJerseyTest {
 
     @Test
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/JettyServerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/JettyServerTest.java
index ce898c2..b4c5b09 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/JettyServerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/JettyServerTest.java
@@ -13,6 +13,10 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+/**
+ * @author margaretha
+ *
+ */
 public class JettyServerTest {
 
     @BeforeClass
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/KustvaktCoreRestTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/KustvaktCoreRestTest.java
deleted file mode 100644
index 4d63221..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/KustvaktCoreRestTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package de.ids_mannheim.korap.web.controller;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-import com.sun.jersey.api.client.ClientResponse;
-
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.web.FastJerseyTest;
-
-/**
- * @author hanl
- * @date 26/06/2015
- */
-public class KustvaktCoreRestTest extends FastJerseyTest {
-
-	@Override
-    public void initMethod () throws KustvaktException {
-//        helper().setupAccount();
-//        helper().runBootInterfaces();
-    }
-	
-    //    @Test
-    public void testFieldsInSearch () {
-        ClientResponse response = resource().path(API_VERSION)
-                .path("search").queryParam("q", "[base=Wort]")
-                .queryParam("ql", "poliqarp").get(ClientResponse.class);
-        assert ClientResponse.Status.OK.getStatusCode() == response.getStatus();
-    }
-
-
-    @Test
-    public void testQuery () {
-        ClientResponse response = resource().path(API_VERSION)
-                .path("search").queryParam("q", "[base=Wort]")
-                .queryParam("ql", "poliqarp").get(ClientResponse.class);
-        //        System.out.println("_______________________________________________");
-//                System.out.println(response.getEntity(String.class));
-        assert ClientResponse.Status.OK.getStatusCode() == response.getStatus();
-    }
-
-
-    @Test
-    public void testQueryRaw () {
-        QuerySerializer s = new QuerySerializer();
-        s.setQuery("[base=Wort]", "poliqarp");
-
-        ClientResponse response = resource().path(API_VERSION)
-                .path("search").post(ClientResponse.class, s.toJSON());
-        //        System.out.println("_______________________________________________ RAW");
-        //        System.out.println(response.getEntity(String.class));
-        assert ClientResponse.Status.OK.getStatusCode() == response.getStatus();
-    }
-
-
-    // in case no index is there, this will throw an error
-    @Test
-    @Ignore
-    public void testGetMatchInfoThrowsNoException () {
-        ClientResponse response = resource().path(API_VERSION).get(
-                ClientResponse.class);
-    }
-   
-    //    @Test
-    public void testBuildQueryThrowsNoException () {
-        ClientResponse response = resource().path(API_VERSION)
-                .path("search").queryParam("q", "[base=Haus & surface=Hauses]")
-                .queryParam("ql", "poliqarp").queryParam("cutOff", "true")
-                .queryParam("page", "1").method("TRACE", ClientResponse.class);
-        assert ClientResponse.Status.OK.getStatusCode() == response.getStatus();
-    }
-
-
-    //    @Test
-    public void testQueryByNameThrowsNoException () {
-        ClientResponse response = resource().path(API_VERSION)
-                .path("corpus").path("WPD").path("search")
-                .queryParam("q", "[base=Haus & surface=Hauses]")
-                .queryParam("ql", "poliqarp").queryParam("cutOff", "true")
-                .queryParam("page", "1").get(ClientResponse.class);
-//        System.out.println("RESPONSE " + response.getEntity(String.class));
-    }
-    
-}
