public function testDefinition()
 {
     $container = new ContainerBuilder();
     $demo = new Definition('Demo');
     $container->addDefinition(array('service1' => $demo, 'service2' => new Definition('Demo2')));
     $this->assertTrue($container->hasDefinition('service1'));
     $this->assertTrue($container->hasDefinition('service2'));
     $this->assertSame($demo, $container->getDefinition('service1'));
     $container->replaceDefinition(array('service3' => $demo));
     $this->assertFalse($container->hasDefinition('service1'));
     $this->assertTrue($container->hasDefinition('service3'));
     $this->assertSame($demo, $container->getDefinition('service3'));
 }