public function testFind()
 {
     $this->loadFixture();
     $result = $this->service->find([[DeliveryMonitoringService::COLUMN_DELIVERY_EXECUTION_ID => 'http://sample/first.rdf#i1450191587554175_test_record']]);
     $this->assertEquals(count($result), 1);
     $this->assertEquals($result[0]->get()[DeliveryMonitoringService::COLUMN_DELIVERY_EXECUTION_ID], 'http://sample/first.rdf#i1450191587554175_test_record');
     $result = $this->service->find([['error_code' => '1'], 'OR', ['error_code' => '2']]);
     $this->assertEquals(count($result), 2);
     $result = $this->service->find([['error_code' => '1'], 'AND', ['session_id' => 'i1450191587554175']]);
     $this->assertEquals(count($result), 1);
     $result = $this->service->find([[DeliveryMonitoringService::COLUMN_STATUS => 'finished_test'], ['error_code' => '1']]);
     $this->assertEquals(count($result), 0);
     $result = $this->service->find([[DeliveryMonitoringService::COLUMN_STATUS => 'finished_test'], 'AND', [['error_code' => '0'], 'OR', ['error_code' => '1']]]);
     $this->assertEquals(count($result), 1);
     $result = $this->service->find([[DeliveryMonitoringService::COLUMN_STATUS => 'finished_test'], ['error_code' => '0']]);
     $this->assertEquals(count($result), 1);
     $this->assertEquals($result[0]->get()[DeliveryMonitoringService::COLUMN_DELIVERY_EXECUTION_ID], 'http://sample/first.rdf#i1450191587554178_test_record');
     $result = $this->service->find([[DeliveryMonitoringService::COLUMN_STATUS => 'finished_test'], ['error_code' => '0']], [], true);
     $this->assertEquals(count($result), 1);
     $this->assertEquals($result[0]->get()[DeliveryMonitoringService::COLUMN_DELIVERY_EXECUTION_ID], 'http://sample/first.rdf#i1450191587554178_test_record');
     $this->assertEquals($result[0]->get()['error_code'], '0');
     $result = $this->service->find([[DeliveryMonitoringService::COLUMN_STATUS => 'finished_test']], [], true);
     $this->assertEquals(count($result), 2);
     foreach ($result as $resultRow) {
         $this->assertTrue(isset($resultRow->get()['error_code']));
         $this->assertTrue(isset($resultRow->get()['session_id']));
     }
     $result = $this->service->find([['error_code' => '>=0']], ['order' => 'error_code ASC, session_id'], true);
     $this->assertEquals(count($result), 4);
     foreach ($result as $rowKey => $resultRow) {
         $this->assertEquals($rowKey, $resultRow->get()['error_code']);
     }
     $result = $this->service->find([[DeliveryMonitoringService::COLUMN_DELIVERY_EXECUTION_ID => ['http://sample/first.rdf#i1450191587554175_test_record', 'http://sample/first.rdf#i1450191587554176_test_record', 'http://sample/first.rdf#i1450191587554177_test_record']]], ['order' => 'session_id'], true);
     $this->assertEquals(count($result), 3);
     $this->assertEquals($result[0]->get()[DeliveryMonitoringService::COLUMN_DELIVERY_EXECUTION_ID], 'http://sample/first.rdf#i1450191587554175_test_record');
     $this->assertEquals($result[1]->get()[DeliveryMonitoringService::COLUMN_DELIVERY_EXECUTION_ID], 'http://sample/first.rdf#i1450191587554176_test_record');
     $this->assertEquals($result[2]->get()[DeliveryMonitoringService::COLUMN_DELIVERY_EXECUTION_ID], 'http://sample/first.rdf#i1450191587554177_test_record');
 }