diff --git a/tests/lib/appframework/AppTest.php b/tests/lib/appframework/AppTest.php
index dcf0e6f77e3ad2e497d5233cd7a15e31e026f3d5..e8ae8c8f673bd8f173929f6105c1963fb62343b1 100644
--- a/tests/lib/appframework/AppTest.php
+++ b/tests/lib/appframework/AppTest.php
@@ -30,7 +30,7 @@ use OC\AppFramework\Middleware\MiddlewareDispatcher;
 
 // FIXME: loading pimpl correctly from 3rdparty repo
 require_once __DIR__ . '/../../../3rdparty/Pimple/Pimple.php';
-require_once __DIR__ . "/classloader.php";
+//require_once __DIR__ . "/classloader.php";
 
 
 class AppTest extends \PHPUnit_Framework_TestCase {
diff --git a/tests/lib/appframework/classloader.php b/tests/lib/appframework/classloader.php
deleted file mode 100644
index cd9f893df30a72cf8e868d44357387001518e0cf..0000000000000000000000000000000000000000
--- a/tests/lib/appframework/classloader.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-/**
- * ownCloud - App Framework
- *
- * @author Bernhard Posselt
- * @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-// to execute without ownCloud, we need to create our own class loader
-spl_autoload_register(function ($className){
-	if (strpos($className, 'OC\\AppFramework') === 0) {
-		$path = strtolower(str_replace('\\', '/', substr($className, 3)) . '.php');
-		$relPath = __DIR__ . '/../../../lib/' . $path;
-
-		if(file_exists($relPath)){
-			require_once $relPath;
-		}
-	}
-
-	if (strpos($className, 'OCP\\') === 0) {
-		$path = strtolower(str_replace('\\', '/', substr($className, 3)) . '.php');
-		$relPath = __DIR__ . '/../../../lib/public' . $path;
-
-		if(file_exists($relPath)){
-			require_once $relPath;
-		}
-	}
-
-	// FIXME: this will most probably not work anymore
-	if (strpos($className, 'OCA\\') === 0) {
-
-		$path = strtolower(str_replace('\\', '/', substr($className, 3)) . '.php');
-		$relPath = __DIR__ . '/../..' . $path;
-
-		if(file_exists($relPath)){
-			require_once $relPath;
-		}
-	}
-});
diff --git a/tests/lib/appframework/controller/ControllerTest.php b/tests/lib/appframework/controller/ControllerTest.php
index d8357c2a6852ef1cf4c3a5124d034b0b438bd160..246371d249ccfdd9674e199a130943b888a98795 100644
--- a/tests/lib/appframework/controller/ControllerTest.php
+++ b/tests/lib/appframework/controller/ControllerTest.php
@@ -25,12 +25,11 @@
 namespace Test\AppFramework\Controller;
 
 use OC\AppFramework\Http\Request;
-use OC\AppFramework\Http\JSONResponse;
-use OC\AppFramework\Http\TemplateResponse;
 use OC\AppFramework\Controller\Controller;
+use OCP\AppFramework\Http\TemplateResponse;
 
 
-require_once(__DIR__ . "/../classloader.php");
+//require_once __DIR__ . "/../classloader.php";
 
 
 class ChildController extends Controller {};
diff --git a/tests/lib/appframework/dependencyinjection/DIContainerTest.php b/tests/lib/appframework/dependencyinjection/DIContainerTest.php
index ce346f0a763b94ade868aaac876e01e60b5e4426..25fdd202839340ad233dff21caff16b8bb01e3b8 100644
--- a/tests/lib/appframework/dependencyinjection/DIContainerTest.php
+++ b/tests/lib/appframework/dependencyinjection/DIContainerTest.php
@@ -29,7 +29,7 @@ namespace OC\AppFramework\DependencyInjection;
 use \OC\AppFramework\Http\Request;
 
 
-require_once(__DIR__ . "/../classloader.php");
+//require_once(__DIR__ . "/../classloader.php");
 
 
 class DIContainerTest extends \PHPUnit_Framework_TestCase {
diff --git a/tests/lib/appframework/http/DispatcherTest.php b/tests/lib/appframework/http/DispatcherTest.php
index 2e3db110504bcbd06b40f00f5a884a8eea619b87..849b0ca97a68dcb1bb0456c0c87e1750427065cd 100644
--- a/tests/lib/appframework/http/DispatcherTest.php
+++ b/tests/lib/appframework/http/DispatcherTest.php
@@ -27,7 +27,7 @@ namespace OC\AppFramework\Http;
 use OC\AppFramework\Core\API;
 use OC\AppFramework\Middleware\MiddlewareDispatcher;
 
-require_once(__DIR__ . "/../classloader.php");
+//require_once(__DIR__ . "/../classloader.php");
 
 
 class DispatcherTest extends \PHPUnit_Framework_TestCase {
@@ -69,7 +69,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
 			$this->http, $this->middlewareDispatcher);
 		
 		$this->response = $this->getMockBuilder(
-			'\OC\AppFramework\Http\Response')
+			'\OCP\AppFramework\Http\Response')
 			->disableOriginalConstructor()
 			->getMock();
 
@@ -207,7 +207,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
 		$out = 'yo';
 		$httpHeaders = 'Http';
 		$responseHeaders = array('hell' => 'yeah');
-		$this->setMiddlewareExpections($out, $httpHeaders, $responseHeaders, true, false);		
+		$this->setMiddlewareExpections($out, $httpHeaders, $responseHeaders, true, false);
 
 		$this->setExpectedException('\Exception');
 		$response = $this->dispatcher->dispatch($this->controller, 
diff --git a/tests/lib/appframework/http/DownloadResponseTest.php b/tests/lib/appframework/http/DownloadResponseTest.php
index 103cfe7588cc954d1323fae163efef546c27b15b..64fe7992b6a83d8f50d345ab61d79e1805ac8b9f 100644
--- a/tests/lib/appframework/http/DownloadResponseTest.php
+++ b/tests/lib/appframework/http/DownloadResponseTest.php
@@ -25,7 +25,7 @@
 namespace OC\AppFramework\Http;
 
 
-require_once(__DIR__ . "/../classloader.php");
+//require_once(__DIR__ . "/../classloader.php");
 
 
 class ChildDownloadResponse extends DownloadResponse {};
diff --git a/tests/lib/appframework/http/HttpTest.php b/tests/lib/appframework/http/HttpTest.php
index 306bc3caf42a0733924034c6e0c26b6650ca6044..382d511b116449aa0ecda0047db07110ebbd93ad 100644
--- a/tests/lib/appframework/http/HttpTest.php
+++ b/tests/lib/appframework/http/HttpTest.php
@@ -25,7 +25,7 @@
 namespace OC\AppFramework\Http;
 
 
-require_once(__DIR__ . "/../classloader.php");
+//require_once(__DIR__ . "/../classloader.php");
 
 
 
diff --git a/tests/lib/appframework/http/JSONResponseTest.php b/tests/lib/appframework/http/JSONResponseTest.php
index d15e08f6ce15c5af63ed931dc95eaa78a7379d8a..534c54cbcee726f473c1b55d59162d95b20e01bb 100644
--- a/tests/lib/appframework/http/JSONResponseTest.php
+++ b/tests/lib/appframework/http/JSONResponseTest.php
@@ -27,7 +27,9 @@
 namespace OC\AppFramework\Http;
 
 
-require_once(__DIR__ . "/../classloader.php");
+use OCP\AppFramework\Http\JSONResponse;
+
+//require_once(__DIR__ . "/../classloader.php");
 
 
 
diff --git a/tests/lib/appframework/http/RedirectResponseTest.php b/tests/lib/appframework/http/RedirectResponseTest.php
index a8577feed29bc7d92b8fff76c86e1d99d526aca7..1946655b0fa54ea6c95ab9cdb3fff6e0fbefe2a9 100644
--- a/tests/lib/appframework/http/RedirectResponseTest.php
+++ b/tests/lib/appframework/http/RedirectResponseTest.php
@@ -25,7 +25,7 @@
 namespace OC\AppFramework\Http;
 
 
-require_once(__DIR__ . "/../classloader.php");
+//require_once(__DIR__ . "/../classloader.php");
 
 
 
diff --git a/tests/lib/appframework/http/RequestTest.php b/tests/lib/appframework/http/RequestTest.php
index c1f56c016360ae2a3af9d5248f988e29769f2716..0371c870cf292682b70a35a35fac70d3020f2468 100644
--- a/tests/lib/appframework/http/RequestTest.php
+++ b/tests/lib/appframework/http/RequestTest.php
@@ -9,8 +9,6 @@
 namespace OC\AppFramework\Http;
 
 
-require_once(__DIR__ . "/../classloader.php");
-
 class RequestTest extends \PHPUnit_Framework_TestCase {
 
 	public function testRequestAccessors() {
diff --git a/tests/lib/appframework/http/ResponseTest.php b/tests/lib/appframework/http/ResponseTest.php
index 621ba66545f5012c230e0e0fe13983c0a69dcebc..7e09086f80172d3f4bd0a9245434560347b47363 100644
--- a/tests/lib/appframework/http/ResponseTest.php
+++ b/tests/lib/appframework/http/ResponseTest.php
@@ -25,13 +25,14 @@
 namespace OC\AppFramework\Http;
 
 
-require_once(__DIR__ . "/../classloader.php");
-
+use OCP\AppFramework\Http\Response;
 
 
 class ResponseTest extends \PHPUnit_Framework_TestCase {
 
-
+	/**
+	 * @var \OCP\AppFramework\Http\Response
+	 */
 	private $childResponse;
 
 	protected function setUp(){
diff --git a/tests/lib/appframework/http/TemplateResponseTest.php b/tests/lib/appframework/http/TemplateResponseTest.php
index 30684725b72afffd7e1386829ff6b22be85714cd..3c6d29cd3392bfcb1a7c9b07923a1578a7abe212 100644
--- a/tests/lib/appframework/http/TemplateResponseTest.php
+++ b/tests/lib/appframework/http/TemplateResponseTest.php
@@ -24,15 +24,19 @@
 
 namespace OC\AppFramework\Http;
 
-use OC\AppFramework\Core\API;
-
-
-require_once(__DIR__ . "/../classloader.php");
+use OCP\AppFramework\Http\TemplateResponse;
 
 
 class TemplateResponseTest extends \PHPUnit_Framework_TestCase {
 
+	/**
+	 * @var \OCP\AppFramework\Http\TemplateResponse
+	 */
 	private $tpl;
+
+	/**
+	 * @var \OCP\AppFramework\IApi
+	 */
 	private $api;
 
 	protected function setUp() {
diff --git a/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php b/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php
index bfa54a48ea396790d740d68794fac2f5a003d31c..d1b2fedee58878f78f6e22f503a8220142550565 100644
--- a/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php
+++ b/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php
@@ -24,14 +24,10 @@
 
 namespace OC\AppFramework;
 
-use OC\AppFramework\Controller\Controller;
 use OC\AppFramework\Http\Request;
-use OC\AppFramework\Http\Response;
 use OC\AppFramework\Middleware\Middleware;
 use OC\AppFramework\Middleware\MiddlewareDispatcher;
-
-
-require_once(__DIR__ . "/../classloader.php");
+use OCP\AppFramework\Http\Response;
 
 
 // needed to test ordering
diff --git a/tests/lib/appframework/middleware/MiddlewareTest.php b/tests/lib/appframework/middleware/MiddlewareTest.php
index 1adce6b3d4f186f71c98c15862763d71b91d9883..5e2930ac6a36a426127e164286ae1093a8006680 100644
--- a/tests/lib/appframework/middleware/MiddlewareTest.php
+++ b/tests/lib/appframework/middleware/MiddlewareTest.php
@@ -28,14 +28,14 @@ use OC\AppFramework\Http\Request;
 use OC\AppFramework\Middleware\Middleware;
 
 
-require_once(__DIR__ . "/../classloader.php");
-
-
 class ChildMiddleware extends Middleware {};
 
 
 class MiddlewareTest extends \PHPUnit_Framework_TestCase {
 
+	/**
+	 * @var Middleware
+	 */
 	private $middleware;
 	private $controller;
 	private $exception;
@@ -50,12 +50,13 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase {
 		$this->controller = $this->getMock('OC\AppFramework\Controller\Controller',
 				array(), array($this->api, new Request()));
 		$this->exception = new \Exception();
-		$this->response = $this->getMock('OC\AppFramework\Http\Response');
+		$this->response = $this->getMock('OCP\AppFramework\Http\Response');
 	}
 
 
 	public function testBeforeController() {
-		$this->middleware->beforeController($this->controller, null, $this->exception);
+		$this->middleware->beforeController($this->controller, null);
+		$this->assertNull(null);
 	}
 
 
diff --git a/tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php b/tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
index 90a19c9999dbe157673591890d96cf42b516ec9c..3ed44282a7b0b3a625fd6ef88a2a67e90464123c 100644
--- a/tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
+++ b/tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
@@ -27,11 +27,7 @@ namespace OC\AppFramework\Middleware\Security;
 use OC\AppFramework\Http\Http;
 use OC\AppFramework\Http\Request;
 use OC\AppFramework\Http\RedirectResponse;
-use OC\AppFramework\Http\JSONResponse;
-use OC\AppFramework\Middleware\Middleware;
-
-
-require_once(__DIR__ . "/../../classloader.php");
+use OCP\AppFramework\Http\JSONResponse;
 
 
 class SecurityMiddlewareTest extends \PHPUnit_Framework_TestCase {
diff --git a/tests/lib/appframework/routing/RoutingTest.php b/tests/lib/appframework/routing/RoutingTest.php
index 92ad461471da742e7faf66524b2cf4e79a10f04a..a7aa922db12becd05a88115ca7608275d466f70f 100644
--- a/tests/lib/appframework/routing/RoutingTest.php
+++ b/tests/lib/appframework/routing/RoutingTest.php
@@ -5,7 +5,6 @@ namespace OC\AppFramework\Routing;
 use OC\AppFramework\DependencyInjection\DIContainer;
 use OC\AppFramework\routing\RouteConfig;
 
-require_once(__DIR__ . "/../classloader.php");
 
 class RouteConfigTest extends \PHPUnit_Framework_TestCase
 {
diff --git a/tests/lib/appframework/utility/MethodAnnotationReaderTest.php b/tests/lib/appframework/utility/MethodAnnotationReaderTest.php
index bcdcf3de37b59b99b69e00d409f478d729a8a9fd..c68812aa5c76dbcb3c76ea4a1d0e50893c368c98 100644
--- a/tests/lib/appframework/utility/MethodAnnotationReaderTest.php
+++ b/tests/lib/appframework/utility/MethodAnnotationReaderTest.php
@@ -25,9 +25,6 @@
 namespace OC\AppFramework\Utility;
 
 
-require_once __DIR__ . "/../classloader.php";
-
-
 class MethodAnnotationReaderTest extends \PHPUnit_Framework_TestCase {