public function testModels()
{
// Asserts for product model
list($cKey, $cValue) = $this->config->classUidPair(new Product());
list($pKey, $pValue) = $this->config->primaryKeyPair(new Product());
$this->productRepoMock->shouldReceive('searchableIds')->andReturn([1, 2, 3])->byDefault();
$hitMock = m::mock('ZendSearch\\Lucene\\Search\\QueryHit');
$hitMock->{$cKey} = $cValue;
$hitMock->{$pKey} = 1;
$this->assertEquals([1], $this->config->models([$hitMock])->lists('id')->all());
$hitMock->{$pKey} = 5;
$this->assertEquals([], $this->config->models([$hitMock])->lists('id')->all());
// Asserts for dummy model
list($cKey, $cValue) = $this->config->classUidPair(new DummyModel());
list($pKey, $pValue) = $this->config->primaryKeyPair(new DummyModel());
$builderMock = m::mock(Builder::class);
$this->dummyMock->shouldReceive('newQuery')->andReturn($builderMock);
$builderMock->shouldReceive('lists')->with('pk')->andReturn([1, 2, 3])->byDefault();
$hitMock = m::mock('ZendSearch\\Lucene\\Search\\QueryHit');
$hitMock->{$cKey} = $cValue;
$hitMock->{$pKey} = 3;
$this->assertEquals([3], $this->config->models([$hitMock])->lists('pk')->all());
$hitMock->{$pKey} = 10;
$this->assertEquals([], $this->config->models([$hitMock])->lists('pk')->all());
}