public function testPaginate()
{
$models = m::mock(LazyCollection::make([]));
$models->shouldReceive('slice')->with(0, 2)->andReturn($sliced = m::mock(LazyCollection::make([])));
$sliced->shouldReceive('reload')->andReturn(Collection::make([1, 2]));
$query = $this->constructor->query('test');
$this->runner->shouldReceive('models')->with($this->query)->andReturn($models);
$expected = new Paginator([1, 2], 3, 2);
$actual = $query->paginate(2);
$this->assertEquals($expected, $actual);
$models->shouldReceive('slice')->with(2, 2)->andReturn($sliced);
$this->runner->shouldReceive('models')->with($this->query)->andReturn($models);
$actual = $query->paginate(2, 2);
$this->assertEquals($expected, $actual);
}