diff --git a/full/src/test/java/de/ids_mannheim/korap/config/SpringJerseyTest.java b/full/src/test/java/de/ids_mannheim/korap/config/SpringJerseyTest.java
index ac11283..0ce1c11 100644
--- a/full/src/test/java/de/ids_mannheim/korap/config/SpringJerseyTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/config/SpringJerseyTest.java
@@ -1,9 +1,5 @@
 package de.ids_mannheim.korap.config;
 
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.util.concurrent.ThreadLocalRandom;
-
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.support.GenericApplicationContext;
@@ -11,15 +7,14 @@
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.web.context.support.GenericWebApplicationContext;
 
-import com.sun.jersey.api.client.config.ClientConfig;
-import com.sun.jersey.api.client.config.DefaultClientConfig;
-import com.sun.jersey.spi.spring.container.servlet.SpringServlet;
-import com.sun.jersey.test.framework.AppDescriptor;
-import com.sun.jersey.test.framework.JerseyTest;
-import com.sun.jersey.test.framework.WebAppDescriptor;
-import com.sun.jersey.test.framework.spi.container.TestContainerException;
-import com.sun.jersey.test.framework.spi.container.TestContainerFactory;
-import com.sun.jersey.test.framework.spi.container.grizzly.web.GrizzlyWebTestContainerFactory;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.servlet.ServletContainer;
+import org.glassfish.jersey.test.DeploymentContext;
+import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.test.ServletDeploymentContext;
+import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory;
+import org.glassfish.jersey.test.spi.TestContainerException;
+import org.glassfish.jersey.test.spi.TestContainerFactory;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration("classpath:test-config.xml")
@@ -55,32 +50,11 @@
     }
 
     @Override
-    protected AppDescriptor configure () {
-        // Simulation of the production server 
-        // Indicate to use codehaus jackson
-        ClientConfig config = new DefaultClientConfig();
-        config.getFeatures().put("com.sun.jersey.api.json.POJOMappingFeature", true);
-        
-        return new WebAppDescriptor.Builder(classPackages)
-                .servletClass(SpringServlet.class)
-                .contextListenerClass(StaticContextLoaderListener.class)
+    protected DeploymentContext configureDeployment() {
+        return ServletDeploymentContext
+                .forServlet(new ServletContainer(new ResourceConfig().packages(classPackages)))
+                .addListener(StaticContextLoaderListener.class)
                 .contextParam("adminToken", "secret")
                 .build();
     }
-
-    @Override
-    protected int getPort (int defaultPort) {
-        int port = ThreadLocalRandom.current().nextInt(5000, 8000 + 1);
-        try {
-            ServerSocket socket = new ServerSocket(port);
-            socket.close();
-        }
-        catch (IOException e) {
-//            e.printStackTrace();
-            System.out.println("[WARNING] " + e.getMessage());
-            port = getPort(port);
-        }
-        return port;
-    }
-
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/FastJerseyTest.java b/full/src/test/java/de/ids_mannheim/korap/web/FastJerseyTest.java
index a22ded4..ae9a2ef 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/FastJerseyTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/FastJerseyTest.java
@@ -3,6 +3,7 @@
 import java.net.URI;
 import java.util.concurrent.ThreadLocalRandom;
 
+import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.UriBuilder;
 
 import org.junit.After;
@@ -10,17 +11,16 @@
 import org.junit.BeforeClass;
 import org.springframework.web.context.ContextLoaderListener;
 
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.WebResource;
-import com.sun.jersey.api.core.DefaultResourceConfig;
-import com.sun.jersey.spi.spring.container.servlet.SpringServlet;
-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 javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.servlet.ServletContainer;
+import org.glassfish.jersey.test.DeploymentContext;
+import org.glassfish.jersey.test.ServletDeploymentContext;
+import org.glassfish.jersey.test.spi.TestContainer;
+import org.glassfish.jersey.test.spi.TestContainerFactory;
+import org.glassfish.jersey.test.grizzly.GrizzlyTestContainerFactory;
+import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory;
 
 import de.ids_mannheim.korap.config.BeanConfigTest;
 
@@ -33,14 +33,14 @@
 
     public final static String API_VERSION = "v0.1";
 
-    private static DefaultResourceConfig resourceConfig =
-            new DefaultResourceConfig();
+    private static ResourceConfig resourceConfig =
+            new ResourceConfig();
 
     private static TestContainerFactory testContainerFactory;
 
     protected static TestContainer testContainer;
 
-    protected static Client client;
+    protected static javax.ws.rs.client.Client client;
 
     protected static int PORT = 8089; // FB, was: 9000;
     protected static int PORT_IT = 1;
@@ -58,18 +58,18 @@
 
     @BeforeClass
     public static void cleanStaticVariables () {
-        resourceConfig = new DefaultResourceConfig();
+        resourceConfig = new ResourceConfig();
     }
 
 
     protected static void initServer (int port, String[] classPackages) {
-        AppDescriptor ad;
+        DeploymentContext dc;
         if (classPackages == null)
-            ad = new LowLevelAppDescriptor.Builder(resourceConfig).build();
+            dc = DeploymentContext.builder(resourceConfig).build();
         else
-            ad = new WebAppDescriptor.Builder(classPackages)
-                    .servletClass(SpringServlet.class)
-                    .contextListenerClass(ContextLoaderListener.class)
+            dc = ServletDeploymentContext
+                    .forServlet(new ServletContainer(resourceConfig.packages(classPackages)))
+                    .addListener(ContextLoaderListener.class)
                     .contextParam("contextConfigLocation", "classpath:test-config.xml")
                     .build();
 
@@ -82,10 +82,10 @@
         }
 
         testContainer = tcf.create(
-                UriBuilder.fromUri(containerURI).port(port).build(), ad);
-        client = testContainer.getClient();
+                UriBuilder.fromUri(containerURI).port(port).build(), dc);
+        client = testContainer.getClientConfig().getClient();
         if (client == null) {
-            client = Client.create(ad.getClientConfig());
+            client = ClientBuilder.newClient(testContainer.getClientConfig());
         }
     }
 
@@ -108,8 +108,8 @@
     }
 
 
-    public WebResource resource () {
-        return client.resource(getBaseUri());
+    public WebTarget target () {
+        return client.target(getBaseUri());
     }
     
 //    protected TestHelper helper () {
diff --git a/lite/src/test/java/de/ids_mannheim/korap/config/LiteJerseyTest.java b/lite/src/test/java/de/ids_mannheim/korap/config/LiteJerseyTest.java
index e6536f5..882efce 100644
--- a/lite/src/test/java/de/ids_mannheim/korap/config/LiteJerseyTest.java
+++ b/lite/src/test/java/de/ids_mannheim/korap/config/LiteJerseyTest.java
@@ -1,9 +1,5 @@
 package de.ids_mannheim.korap.config;
 
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.util.concurrent.ThreadLocalRandom;
-
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.support.GenericApplicationContext;
@@ -11,13 +7,14 @@
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.web.context.support.GenericWebApplicationContext;
 
-import com.sun.jersey.spi.spring.container.servlet.SpringServlet;
-import com.sun.jersey.test.framework.AppDescriptor;
-import com.sun.jersey.test.framework.JerseyTest;
-import com.sun.jersey.test.framework.WebAppDescriptor;
-import com.sun.jersey.test.framework.spi.container.TestContainerException;
-import com.sun.jersey.test.framework.spi.container.TestContainerFactory;
-import com.sun.jersey.test.framework.spi.container.grizzly.web.GrizzlyWebTestContainerFactory;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.servlet.ServletContainer;
+import org.glassfish.jersey.test.DeploymentContext;
+import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.test.ServletDeploymentContext;
+import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory;
+import org.glassfish.jersey.test.spi.TestContainerException;
+import org.glassfish.jersey.test.spi.TestContainerFactory;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration("classpath:test-config.xml")
@@ -53,26 +50,11 @@
     }
     
     @Override
-    protected AppDescriptor configure () {
-        return new WebAppDescriptor.Builder(classPackages)
-                .servletClass(SpringServlet.class)
-                .contextListenerClass(StaticContextLoaderListener.class)
+    protected DeploymentContext configureDeployment() {
+        return ServletDeploymentContext
+                .forServlet(new ServletContainer(new ResourceConfig().packages(classPackages)))
+                .addListener(StaticContextLoaderListener.class)
                 .contextParam("adminToken", "secret")
                 .build();
     }
-
-    @Override
-    protected int getPort (int defaultPort) {
-        int port = ThreadLocalRandom.current().nextInt(5000, 8000 + 1);
-        try {
-            ServerSocket socket = new ServerSocket(port);
-            socket.close();
-        }
-        catch (IOException e) {
-            e.printStackTrace();
-            port = getPort(port);
-        }
-        return port;
-    }
-    
 }
