diff --git a/config/config-mysql.php b/config/config-mysql.php
new file mode 100644
index 0000000000000000000000000000000000000000..898dfb95b21b6dd3ed40199664f53c5d9903981e
--- /dev/null
+++ b/config/config-mysql.php
@@ -0,0 +1,21 @@
+<?php
+$CONFIG = array (
+  'instanceid' => 'oclip61vhpsy',
+  'passwordsalt' => 'M8h9O5EuS/tpqehZDb.C18yIBWd9HO',
+  'secret' => 'rBz4iMuGwItwHf0qA9q5DeLG73NONGaRCztPQWUDSbjkqCj7',
+  'trusted_domains' => 
+  array (
+    0 => '33.33.33.33',
+  ),
+  'datadirectory' => '/var/www/owncloud/data',
+  'overwrite.cli.url' => 'http://33.33.33.33',
+  'dbtype' => 'mysql',
+  'version' => '7.8.1.0',
+  'dbname' => 'owncloud',
+  'dbhost' => 'localhost',
+  'dbtableprefix' => 'oc_',
+  'dbuser' => 'owncloud',
+  'dbpassword' => 'random',
+  'installed' => true,
+);
+define("DEBUG",1);
\ No newline at end of file
diff --git a/tests/lib/contactsmanager.php b/tests/lib/contactsmanager.php
index 1deeb818f0f7dfe50bb8e5c1983ca8a44263c225..20341ea455accf92b665a0eb5ee2d321a017fcf6 100644
--- a/tests/lib/contactsmanager.php
+++ b/tests/lib/contactsmanager.php
@@ -47,13 +47,10 @@ class Test_ContactsManager extends \Test\TestCase {
 		);
 
 		$expectedResult =  array_merge($search1, $search2);
-
 		return array(
 			array(
-				array(
-					new SimpleAddressbook('simple:1', 'Simeple Addressbook 1', $search1, \OCP\Constants::PERMISSION_ALL),
-					new SimpleAddressbook('simple:2', 'Simeple Addressbook 2', $search2, \OCP\Constants::PERMISSION_ALL),
-				),
+				$search1,
+				$search2,
 				$expectedResult
 			)
 		);
@@ -62,10 +59,34 @@ class Test_ContactsManager extends \Test\TestCase {
 	/**
 	 * @dataProvider searchProvider
 	 */
-	public function testSearch(array $addressBooks,$expectedResult ){
-		foreach ($addressBooks as $addressBook) {
-			$this->cm->registerAddressBook($addressBook);
-		}
+	public function testSearch($search1, $search2, $expectedResult ){
+		$addressbook1 = $this->getMockBuilder('SimpleAddressbook')
+			->disableOriginalConstructor()
+			->getMock();
+
+		$addressbook1->expects($this->once())
+			->method('search')
+			->willReturn($search1);
+
+		$addressbook1->expects($this->any())
+			->method('getKey')
+			->willReturn('simple:1');
+
+		$addressbook2 = $this->getMockBuilder('SimpleAddressbook')
+			->disableOriginalConstructor()
+			->getMock();
+
+		$addressbook2->expects($this->once())
+			->method('search')
+			->willReturn($search2);
+
+		$addressbook2->expects($this->any())
+			->method('getKey')
+			->willReturn('simple:2');
+
+
+		$this->cm->registerAddressBook($addressbook1);
+		$this->cm->registerAddressBook($addressbook2);
 		$result =  $this->cm->search('');
 		$this->assertEquals($expectedResult, $result);
 	}
@@ -185,41 +206,23 @@ class Test_ContactsManager extends \Test\TestCase {
 		$this->assertTrue($result);
 	}
 
-
-
-
-
-
 }
 
-
 class SimpleAddressbook implements \OCP\IAddressBook {
 
-	public function __construct($key, $displayName, $contacts, $permissions){
-		$this->key = $key;
-		$this->contacts = $contacts;
-		$this->displayName = $displayName;
-		$this->permissions = $permissions;
-	}
-
-
 	public function getKey(){
-		return $this->key;
 	}
 
 	public function getDisplayName(){
-		return $this->displayName;
 	}
 
 	public function search($pattern, $searchProperties, $options){
-		return $this->contacts;
 	}
 
 	public function createOrUpdate($properties){
 	}
 
 	public function getPermissions(){
-		return $this->permissions;
 	}
 
 	public function delete($id){