public function testFetchListResult()
 {
     $data = array(42 => array('id' => 42, 'firstname' => 'Manfred', 'lastname' => 'Mustermann', 'street' => 'Am Testen 123', 'postcode' => '54321', 'city' => 'Musterhausen', 'country' => 'de'), 43 => array('id' => 43, 'firstname' => 'Manuela', 'lastname' => 'Musterfrau', 'street' => 'Am Mustern 987', 'postcode' => '98765', 'city' => 'Testhausen', 'country' => 'de'));
     $mockDbStatement = $this->getMock('Zend\\Db\\Adapter\\Driver\\StatementInterface');
     $mockDbStatement->expects($this->any())->method('execute')->will($this->returnValue($data));
     $mockDbDriver = $this->getMock('Zend\\Db\\Adapter\\Driver\\DriverInterface');
     $mockDbDriver->expects($this->any())->method('createStatement')->will($this->returnValue($mockDbStatement));
     $mockDbAdapter = $this->getMock('Zend\\Db\\Adapter\\Adapter', null, array($mockDbDriver));
     $mockCustomerTable = $this->getMock('Customer\\Table\\CustomerTable', null, array($mockDbAdapter));
     $customerService = new CustomerService();
     $customerService->setCustomerTable($mockCustomerTable);
     $customerList = $customerService->fetchList();
     $this->assertInternalType('array', $customerList);
     foreach ($customerList as $key => $customerEntity) {
         $this->assertTrue($customerEntity instanceof CustomerEntity);
         $this->assertSame($data[$key]['id'], $customerEntity->getId());
         $this->assertSame($data[$key]['firstname'], $customerEntity->getFirstname());
         $this->assertSame($data[$key]['lastname'], $customerEntity->getLastname());
         $this->assertSame($data[$key]['street'], $customerEntity->getStreet());
         $this->assertSame($data[$key]['postcode'], $customerEntity->getPostcode());
         $this->assertSame($data[$key]['city'], $customerEntity->getCity());
         $this->assertSame($data[$key]['country'], $customerEntity->getCountry());
     }
 }