public function throwsAnErrorWhenCallingGetSingletonTwiceOnTheSameEntity()
{
$this->factory->defineEntity('SpaceShip', array('name' => 'Alpha'));
$this->factory->getAsSingleton('SpaceShip');
$self = $this;
$this->assertThrows(function () use($self) {
$self->factory->getAsSingleton('SpaceShip');
});
}