public function testThrowExceptionWhenNoEncoders()
{
$definition = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Definition')->getMock();
$container = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'getDefinition'))->getMock();
$container->expects($this->once())->method('hasDefinition')->with('serializer')->will($this->returnValue(true));
$container->expects($this->any())->method('findTaggedServiceIds')->will($this->onConsecutiveCalls(array('n' => array('serializer.normalizer')), array()));
$container->expects($this->once())->method('getDefinition')->will($this->returnValue($definition));
$this->setExpectedException('RuntimeException');
$serializerPass = new SerializerPass();
$serializerPass->process($container);
}