public function findAllCreatesQueryAndReturnsResultOfExecuteCall()
{
$expectedResult = $this->createMock(Persistence\QueryResultInterface::class);
$mockQuery = $this->createMock(Persistence\QueryInterface::class);
$mockQuery->expects($this->once())->method('execute')->with()->will($this->returnValue($expectedResult));
$repository = $this->getMockBuilder(Persistence\Repository::class)->setMethods(['createQuery'])->getMock();
$repository->expects($this->once())->method('createQuery')->will($this->returnValue($mockQuery));
$this->assertSame($expectedResult, $repository->findAll());
}