diff --git a/src/test/java/UserdataTest.java b/src/test/java/UserdataTest.java
index c3cc6b8..e5b598f 100644
--- a/src/test/java/UserdataTest.java
+++ b/src/test/java/UserdataTest.java
@@ -1,5 +1,6 @@
 import de.ids_mannheim.korap.config.BeanConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.exceptions.dbException;
 import de.ids_mannheim.korap.handlers.UserDetailsDao;
 import de.ids_mannheim.korap.handlers.UserSettingsDao;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
@@ -47,7 +48,7 @@
     }
 
     @Test
-    public void testDataGet() {
+    public void testDataGet() throws dbException {
         User user = new KorAPUser();
         user.setId(1);
         UserDetailsDao dao = new UserDetailsDao(
diff --git a/src/test/java/de/ids_mannheim/korap/config/TestHelper.java b/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
index c1e2cd1..2a685a8 100644
--- a/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
+++ b/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
@@ -10,6 +10,8 @@
 import org.springframework.jdbc.core.RowCallbackHandler;
 import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
 
+import java.io.UnsupportedEncodingException;
+import java.security.NoSuchAlgorithmException;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.*;
@@ -25,9 +27,9 @@
     private static final String[] credentials = new String[] { "test1",
             "testPass2015" };
 
-    public static boolean setupUser() {
+    public static boolean setupAccount() {
         boolean r = BeanConfiguration.hasContext();
-        if (r) {
+        if (r && BeanConfiguration.getBeans().getUserDBHandler().size() == 0) {
             EntityHandlerIface dao = BeanConfiguration.getBeans()
                     .getUserDBHandler();
             Map m = new HashMap<>();
@@ -45,8 +47,37 @@
                         .createUserAccount(m, false);
             }catch (KustvaktException e) {
                 // do nothing
-                System.out.println("THE EXCEPTION...");
-                e.printStackTrace();
+                Assert.assertNull("Test user could not be set up", true);
+                return false;
+            }
+        }
+        return r;
+    }
+
+    public static boolean setupSimpleAccount() {
+        boolean r = BeanConfiguration.hasContext();
+        if (r && BeanConfiguration.getBeans().getUserDBHandler().size() == 0) {
+            EntityHandlerIface dao = BeanConfiguration.getBeans()
+                    .getUserDBHandler();
+            Map m = new HashMap<>();
+            m.put(Attributes.USERNAME, credentials[0]);
+
+            try {
+                String hash = BeanConfiguration.getBeans().getEncryption()
+                        .produceSecureHash(credentials[1]);
+                m.put(Attributes.PASSWORD, hash);
+            }catch (NoSuchAlgorithmException | UnsupportedEncodingException | KustvaktException e) {
+
+            }
+            Assert.assertNotNull("userdatabase handler must not be null", dao);
+
+            try {
+                int i = dao.createAccount(User.UserFactory.toKorAPUser(m));
+                assert BeanConfiguration.getBeans().getUserDBHandler()
+                        .getAccount(credentials[0]) != null;
+                assert i == 1;
+            }catch (KustvaktException e) {
+                // do nothing
                 Assert.assertNull("Test user could not be set up", true);
                 return false;
             }
@@ -80,7 +111,18 @@
         return r;
     }
 
-    public static boolean truncateAllUsers() {
+    public static void drop() {
+        if (BeanConfiguration.hasContext()) {
+            PersistenceClient cl = BeanConfiguration.getBeans()
+                    .getPersistenceClient();
+            String sql = "drop database " + cl.getDatabase() + ";";
+            NamedParameterJdbcTemplate jdbc = (NamedParameterJdbcTemplate) cl
+                    .getSource();
+            jdbc.update(sql, new HashMap<String, Object>());
+        }
+    }
+
+    public static boolean truncateAll() {
         boolean r = BeanConfiguration.hasContext();
         if (r) {
             String sql = "SELECT Concat('TRUNCATE TABLE ', TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES";
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/KustvaktResourceServiceTest.java b/src/test/java/de/ids_mannheim/korap/web/service/KustvaktResourceServiceTest.java
index 62beae8..4f27150 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/KustvaktResourceServiceTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/KustvaktResourceServiceTest.java
@@ -4,6 +4,7 @@
 import com.sun.jersey.api.client.ClientResponse;
 import de.ids_mannheim.korap.config.BeanConfiguration;
 import de.ids_mannheim.korap.config.TestHelper;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.security.auth.BasicHttpAuth;
 import de.ids_mannheim.korap.user.Attributes;
 import de.ids_mannheim.korap.utils.JsonUtils;
@@ -27,7 +28,8 @@
     }
 
     @AfterClass
-    public static void close() {
+    public static void close() throws KustvaktException {
+        BeanConfiguration.getBeans().getResourceProvider().deleteAll();
         BeanConfiguration.closeApplication();
     }
 
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 f0865b6..e1dc167 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
@@ -35,7 +35,7 @@
                 "de.ids_mannheim.korap.web.filter",
                 "de.ids_mannheim.korap.web.utils");
 
-        TestHelper.setupUser();
+        TestHelper.setupAccount();
         credentials = TestHelper.getUserCredentials();
     }
 
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 a804d69..4cf5ecb 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
@@ -39,7 +39,7 @@
         info.setUrl("http://localhost:8080/api/v0.1");
         info.setRedirect_uri("testwebsite/login");
 
-        TestHelper.setupUser();
+        TestHelper.setupAccount();
         user = TestHelper.getUser();
         handler.registerClient(info, user);
     }
