public function testApiShare_ThrowsException_WhenModelThrowsException()
{
$this->setExpectedException(WriteException::class);
$container = $this->createContainer();
$this->container->add(Baz::class, null, true)->willThrow(new Exception())->shouldBeCalledTimes(1);
$container->share(Baz::class, []);
}