$this->assertTrue($builder->setDefinition('foobar',$foo=newDefinition('FooBarClass'))===$foo,'->setDefinition() implements a fuild interface by returning the service reference');
$this->assertType('\InvalidArgumentException',$e,'->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
$this->assertEquals('The service definition "baz" does not exist.',$e->getMessage(),'->getDefinition() throws an InvalidArgumentException if the service definition does not exist');
$this->assertType('Symfony\Components\DependencyInjection\Definition',$builder->getDefinition('foo'),'->register() returns the newly created Definition instance');
$this->assertType('\InvalidArgumentException',$e,'->getService() throws an InvalidArgumentException if the service does not exist');
$this->assertEquals('The service definition "foo" does not exist.',$e->getMessage(),'->getService() throws an InvalidArgumentException if the service does not exist');
$this->assertEquals($bar,$builder->getService('bar'),'->getService() returns the service associated with the id even if a definition has been defined');
$this->assertType('\LogicException',$e,'->getService() throws a LogicException if the service has a circular reference to itself');
$this->assertEquals('The service "baz" has a circular reference to itself.',$e->getMessage(),'->getService() throws a LogicException if the service has a circular reference to itself');
$this->assertTrue($builder->getService('bar')===$builder->getService('bar'),'->getService() always returns the same instance if the service is shared');
$this->assertType('\InvalidArgumentException',$e,'->getAlias() throws an InvalidArgumentException if the alias does not exist');
$this->assertEquals('The service alias "foobar" does not exist.',$e->getMessage(),'->getAlias() throws an InvalidArgumentException if the alias does not exist');
$this->assertEquals(array('foo'=>'bar','bar'=>'foo',$builder->getService('bar')),$builder->getService('foo1')->arguments,'->createService() replaces parameters and service references in the arguments provided by the service definition');
$this->assertEquals(array('foo'=>'bar','bar'=>'foo',$builder->getService('bar')),$builder->getService('foo1')->arguments,'->createService() passes the arguments to the constructor');
$this->assertEquals(array('bar',$builder->getService('bar')),$builder->getService('foo1')->bar,'->createService() replaces the values in the method calls arguments');
$this->assertType('\InvalidArgumentException',$e,'->createService() throws an InvalidArgumentException if the configure callable is not a valid callable');
$this->assertEquals('The configure callable for class "FooClass" is not a callable.',$e->getMessage(),'->createService() throws an InvalidArgumentException if the configure callable is not a valid callable');
$this->assertTrue(Builder::resolveValue('%foo%',array('foo'=>true))===true,'->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings');
$this->assertEquals(array('bar'=>'bar'),Builder::resolveValue(array('%foo%'=>'%foo%'),array('foo'=>'bar')),'->resolveValue() replaces placeholders in keys and values of arrays');
$this->assertEquals('I\'m a %foo%',Builder::resolveValue('I\'m a %%foo%%',array('foo'=>'bar')),'->resolveValue() supports % escaping by doubling it');
$this->assertEquals('I\'m a bar %foo bar',Builder::resolveValue('I\'m a %foo% %%foo %foo%',array('foo'=>'bar')),'->resolveValue() supports % escaping by doubling it');
$this->assertType('\RuntimeException',$e,'->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
$this->assertEquals('The parameter "foobar" must be defined.',$e->getMessage(),'->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
$this->assertType('\RuntimeException',$e,'->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
$this->assertEquals('The parameter "foobar" must be defined (used in the following expression: "foo %foobar% bar").',$e->getMessage(),'->resolveValue() throws a RuntimeException if a placeholder references a non-existant parameter');
$this->assertEquals($builder->getService('foo'),$builder->resolveServices(newReference('foo')),'->resolveServices() resolves service references to service instances');
$this->assertEquals(array('foo'=>array('foo',$builder->getService('foo'))),$builder->resolveServices(array('foo'=>array('foo',newReference('foo')))),'->resolveServices() resolves service references to service instances in nested arrays');
$this->assertEquals(array('bar'=>'foo','foo'=>'foo'),$container->getParameters(),'->merge() evaluates the values of the parameters towards already defined ones');
$this->assertEquals(array('bar'=>'foo','foo'=>'foo','baz'=>'foo'),$container->getParameters(),'->merge() evaluates the values of the parameters towards already defined ones');
$this->assertEquals(array(),$builder->findAnnotatedServiceIds('foobar'),'->findAnnotatedServiceIds() returns an empty array if there is annotated services');