public function shouldReturnPromiseIfFactoryReturnsNull()
{
$factory = $this->createCallableMock();
$factory->expects($this->once())->method('__invoke')->will($this->returnValue(null));
$p = new LazyPromise($factory);
$this->assertInstanceOf('React\\Promise\\PromiseInterface', $p->then());
}