diff --git a/src/test/java/.DS_Store b/src/test/java/.DS_Store
index 9462fb8..f388377 100644
--- a/src/test/java/.DS_Store
+++ b/src/test/java/.DS_Store
Binary files differ
diff --git a/src/test/java/CollectionQueryBuilderTest.java b/src/test/java/CollectionQueryBuilderTest.java
index de9a089..aeb753f 100644
--- a/src/test/java/CollectionQueryBuilderTest.java
+++ b/src/test/java/CollectionQueryBuilderTest.java
@@ -13,67 +13,76 @@
     public void testsimpleAdd() {
         CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
         b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "WPD");
-        //        System.out.println(b.toJSON());
+
+        JsonNode node = JsonUtils.readTree(b.toJSON());
+
+        assert node != null;
+        assert node.at("/collection/@type").asText().equals("koral:doc");
+        assert node.at("/collection/key").asText().equals("corpusID");
+
     }
 
     @Test
-    public void testSimpleConjunctive() {
+    public void testSimpleConjunction() {
         CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
         b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "WPD").and()
                 .addSegment("textClass", CollectionQueryBuilder3.EQ.EQUAL,
                         "freizeit");
-        //        System.out.println(b.toJSON());
+        JsonNode node = JsonUtils.readTree(b.toJSON());
+
+        assert node != null;
+        assert node.at("/collection/@type").asText().equals("koral:docGroup");
+        assert node.at("/collection/operation").asText()
+                .equals("operation:and");
+        assert node.at("/collection/operands/0/key").asText()
+                .equals("corpusID");
+        assert node.at("/collection/operands/1/key").asText()
+                .equals("textClass");
     }
 
     @Test
-    public void testSimpleDisjunctive() {
+    public void testSimpleDisjunction() {
         CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "WPD").and()
+        b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "WPD").or()
                 .addSegment("textClass", CollectionQueryBuilder3.EQ.EQUAL,
                         "freizeit");
-        //        System.out.println(b.toJSON());
+        JsonNode node = JsonUtils.readTree(b.toJSON());
+
+        assert node != null;
+        assert node.at("/collection/operation").asText().equals("operation:or");
+        assert node.at("/collection/operands/0/key").asText()
+                .equals("corpusID");
+        assert node.at("/collection/operands/1/key").asText()
+                .equals("textClass");
     }
 
     @Test
     public void testComplexSubQuery() {
-
         CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "ADF").and()
+        b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "ADF").or()
                 .addSub("textClass=freizeit & corpusID=WPD");
-        //        System.out.println(b.toJSON());
-    }
 
-    @Test // basically joining two or more resource queries
-    public void testAddResourceQueryAfter() {
-        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "ADF").and()
-                .addSub("textClass=freizeit & corpusID=WPD");
-        //        System.out.println(b.toJSON());
+        JsonNode node = JsonUtils.readTree(b.toJSON());
 
-        //        join.addSegment("textClass", "politik");
-    }
+        assert node != null;
+        assert node.at("/collection/operation").asText().equals("operation:or");
+        assert node.at("/collection/operands/0/key").asText()
+                .equals("corpusID");
+        assert node.at("/collection/operands/1/@type").asText()
+                .equals("koral:docGroup");
 
-    @Test // basically joining two or more resource queries
-    public void testAddResourceQueryBefore() {
-        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "ADF").and()
-                .addSub("textClass!=freizeit & corpusID=WPD");
-
-        //        CollectionQueryBuilder3 join = new CollectionQueryBuilder3();
-        //        join.addRaw(b.toJSON());
-        //        join.addSegment("textClass", "politik");
-        //        System.out.println("JOINED " + join.toJSON());
     }
 
     @Test
-    public void test1() {
+    public void testAddResourceQueryAfter() {
         CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
         b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "ADF").or()
                 .addSub("textClass=freizeit & corpusID=WPD");
 
         CollectionQueryBuilder3 c = new CollectionQueryBuilder3();
         c.setBaseQuery(b.toJSON());
-        c.addSub("textClass=wissenschaft");
+        c.addSegment("textClass", CollectionQueryBuilder3.EQ.EQUAL,
+                "wissenschaft");
 
         JsonNode node = JsonUtils.readTree(c.toJSON());
 
@@ -84,4 +93,26 @@
                 .equals("wissenschaft");
     }
 
+    @Test
+    public void testAddComplexResourceQueryAfter() {
+        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
+        b.addSegment("corpusID", CollectionQueryBuilder3.EQ.EQUAL, "ADF").or()
+                .addSub("textClass=freizeit & corpusID=WPD");
+
+        CollectionQueryBuilder3 c = new CollectionQueryBuilder3();
+        c.setBaseQuery(b.toJSON());
+        c.addSub("(textClass=politik & corpusID=AZPS)");
+
+        JsonNode node = JsonUtils.readTree(c.toJSON());
+
+        assert node != null;
+        assert node.at("/collection/operands/2/@type").asText()
+                .equals("koral:docGroup");
+        assert node.at("/collection/operands/2/operands/0/value").asText()
+                .equals("politik");
+        assert node.at("/collection/operands/2/operands/1/value").asText()
+                .equals("AZPS");
+
+    }
+
 }
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/AuthServiceTest.java b/src/test/java/de/ids_mannheim/korap/web/service/AuthServiceTest.java
index 2a4486e..10d5855 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/AuthServiceTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/AuthServiceTest.java
@@ -4,5 +4,10 @@
  * @author hanl
  * @date 24/09/2015
  */
-public class AuthServiceTest {
+public class AuthServiceTest extends FastJerseyTest {
+
+    //todo: test basicauth via secure connection
+
+
+
 }
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java b/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java
index f3a0a04..b77e4be 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java
@@ -5,10 +5,10 @@
 import com.sun.jersey.api.core.DefaultResourceConfig;
 import com.sun.jersey.spi.inject.SingletonTypeInjectableProvider;
 import com.sun.jersey.test.framework.AppDescriptor;
-import com.sun.jersey.test.framework.LowLevelAppDescriptor;
+import com.sun.jersey.test.framework.WebAppDescriptor;
 import com.sun.jersey.test.framework.spi.container.TestContainer;
 import com.sun.jersey.test.framework.spi.container.TestContainerFactory;
-import com.sun.jersey.test.framework.spi.container.grizzly.GrizzlyTestContainerFactory;
+import com.sun.jersey.test.framework.spi.container.grizzly.web.GrizzlyWebTestContainerFactory;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -68,11 +68,14 @@
     }
 
     public static void initServer() {
-        AppDescriptor ad = new LowLevelAppDescriptor.Builder(resourceConfig)
-                .build();
+
+        //        AppDescriptor ad = new LowLevelAppDescriptor.Builder(resourceConfig)
+        //                .build();
+        AppDescriptor ad = new WebAppDescriptor.Builder().build();
+
         TestContainerFactory tcf = testContainerFactory;
         if (tcf == null) {
-            tcf = new GrizzlyTestContainerFactory();
+            tcf = new GrizzlyWebTestContainerFactory();
         }
         testContainer = tcf
                 .create(UriBuilder.fromUri("http://localhost/").port(9998)
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/KustvaktCoreRestTest.java b/src/test/java/de/ids_mannheim/korap/web/service/KustvaktCoreRestTest.java
index 88ad2bf..101da58 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/KustvaktCoreRestTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/KustvaktCoreRestTest.java
@@ -4,6 +4,7 @@
 import de.ids_mannheim.korap.config.BeanConfiguration;
 import de.ids_mannheim.korap.query.serialize.CollectionQueryProcessor;
 import de.ids_mannheim.korap.utils.JsonUtils;
+import de.ids_mannheim.korap.web.service.light.LightService;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -74,7 +75,7 @@
                 .queryParam("q", "[base=Haus & surface=Hauses]")
                 .queryParam("ql", "poliqarp").queryParam("cutOff", "true")
                 .queryParam("page", "1").get(ClientResponse.class);
-        System.out.println("RESPONSE " + response);
+        System.out.println("RESPONSE " + response.getEntity(String.class));
     }
 
 }
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/OAuth2EndpointTest.java b/src/test/java/de/ids_mannheim/korap/web/service/OAuth2EndpointTest.java
index 19bb99e..4cd0ed5 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/OAuth2EndpointTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/OAuth2EndpointTest.java
@@ -1,8 +1,32 @@
 package de.ids_mannheim.korap.web.service;
 
+import com.sun.jersey.api.client.ClientResponse;
+import de.ids_mannheim.korap.config.BeanConfiguration;
+import de.ids_mannheim.korap.security.auth.BasicHttpAuth;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
 /**
  * @author hanl
  * @date 23/09/2015
  */
-public class OAuth2EndpointTest {
+public class OAuth2EndpointTest extends FastJerseyTest {
+
+    @BeforeClass
+    public static void configure() {
+        BeanConfiguration.loadClasspathContext();
+        addClass(OAuthService.class);
+        // todo: change korap user personal data!
+        String header = BasicHttpAuth.encode("test", "test1");
+    }
+
+    @Test
+    public void testAuthorizeClient() {
+        ClientResponse response = resource().path(API_VERSION).path("oauth2")
+                .path("register")
+                .queryParam("redirect_url", "korap.ids-mannheim.de/redirect")
+                .header("Host", "korap.ids-mannheim.de")
+                .post(ClientResponse.class);
+    }
+
 }
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java b/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java
index eadced8..7e982f7 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/OAuth2HandlerTest.java
@@ -4,10 +4,11 @@
 import de.ids_mannheim.korap.config.BeanConfiguration;
 import de.ids_mannheim.korap.config.ClientInfo;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.ext.config.BeanHelperExtension;
-import de.ids_mannheim.korap.ext.security.oauth2.OAuth2Handler;
+import de.ids_mannheim.korap.handlers.OAuth2Handler;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
-import de.ids_mannheim.korap.user.*;
+import de.ids_mannheim.korap.user.KorAPUser;
+import de.ids_mannheim.korap.user.TokenContext;
+import de.ids_mannheim.korap.user.User;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
@@ -18,19 +19,17 @@
  * @date 13/05/2015
  */
 
-//works
 public class OAuth2HandlerTest {
 
     private static ClientInfo info;
     private static OAuth2Handler handler;
     private static EncryptionIface crypto;
-    private static final String SCOPE = "search preferences queries account";
+    private static final String SCOPES = "search preferences queries account";
     private static final KorAPUser user = User.UserFactory.getUser("test_user");
 
     @BeforeClass
     public static void setup() throws KustvaktException {
         BeanConfiguration.loadClasspathContext("classpath-config.xml");
-        BeanConfiguration.setCustomBeansHolder(new BeanHelperExtension());
         handler = new OAuth2Handler(
                 BeanConfiguration.getBeans().getPersistenceClient());
         crypto = BeanConfiguration.getBeans().getEncryption();
@@ -58,7 +57,7 @@
         String auth_code = crypto.createToken();
         AuthCodeInfo codeInfo = new AuthCodeInfo(info.getClient_id(),
                 auth_code);
-        codeInfo.setScopes(SCOPE);
+        codeInfo.setScopes(SCOPES);
 
         handler.authorize(codeInfo, user);
         codeInfo = handler.getAuthorization(auth_code);
@@ -71,11 +70,12 @@
         String auth_code = crypto.createToken();
         AuthCodeInfo codeInfo = new AuthCodeInfo(info.getClient_id(),
                 auth_code);
-        codeInfo.setScopes(SCOPE);
+        codeInfo.setScopes(SCOPES);
 
         handler.authorize(codeInfo, user);
         String t = crypto.createToken();
-        handler.addToken(codeInfo.getCode(), t, 7200);
+        String refresh = crypto.createToken();
+        handler.addToken(codeInfo.getCode(), t, refresh, 7200);
 
         TokenContext ctx = handler.getContext(t);
         Assert.assertNotNull("context is null", ctx);
@@ -85,7 +85,16 @@
     }
 
     @Test
+    public void testTokenEndpointRedirect() {
+
+    }
+
+    @Test
     public void testStoreAccessCodeViaAuthCodeThrowsNoException() {
+        String auth_code = crypto.createToken();
+        AuthCodeInfo codeInfo = new AuthCodeInfo(info.getClient_id(),
+                auth_code);
+        codeInfo.setScopes(SCOPES);
 
     }
 
@@ -98,4 +107,15 @@
     public void testAccessTokenbyUserDeleteCascade() {
 
     }
+
+    @Test
+    public void testRefreshToken() {
+
+    }
+
+    // fixme: exception thrown?!
+    @Test
+    public void testAccessTokenExpired() {
+
+    }
 }
