public function allowsOverwritingExistingSingletons()
{
$this->factory->defineEntity('SpaceShip');
$ss1 = new TestEntity\SpaceShip("The mothership");
$ss2 = new TestEntity\SpaceShip("The battlecruiser");
$this->factory->setSingleton('SpaceShip', $ss1);
$this->factory->setSingleton('SpaceShip', $ss2);
$this->assertSame($ss2, $this->factory->get('SpaceShip'));
}