Deprecation: This factory is not needed any more as ProxyManager is now used for lazy loading. Use ezpublish.api.repository instead.
 public function testBuildRepository()
 {
     $repositoryMock = $this->getMock('eZ\\Publish\\API\\Repository\\Repository');
     $factory = new LazyRepositoryFactory($repositoryMock);
     $lazyRepository = $factory->buildRepository();
     $this->assertTrue(is_callable($lazyRepository));
     // Calling several times to ensure container is called only once.
     $this->assertSame($repositoryMock, $lazyRepository());
     $this->assertSame($repositoryMock, $lazyRepository());
     $this->assertSame($repositoryMock, $lazyRepository());
 }