/**
  * {@inheritdoc}
  */
 public function resolveConflict(UriContext $uriContext)
 {
     $conflictResolverConfig = $uriContext->getConflictResolverConfig();
     $conflictResolver = $this->serviceRegistry->getConflictResolver($conflictResolverConfig['name'], $conflictResolverConfig['options']);
     $uri = $conflictResolver->resolveConflict($uriContext);
     return $uri;
 }
 public function testGetSet()
 {
     $uriContext = new UriContext($this->subjectObject, '/uri/', array('default1' => 'value1'), array('token'), array('conflict'), 'fr');
     // locales
     $this->assertEquals('fr', $uriContext->getLocale());
     /// uri
     $this->assertEquals(null, $uriContext->getUri());
     $uriContext->setUri('/foo/bar');
     $this->assertEquals('/foo/bar', $uriContext->getUri());
     // subject object
     $this->assertEquals($this->subjectObject, $uriContext->getSubjectObject());
     // auto route
     $uriContext->setAutoRoute($this->autoRoute);
     $this->assertEquals($this->autoRoute, $uriContext->getAutoRoute());
     // the translated subject should be initially set as the original subject
     $this->assertSame($this->subjectObject, $uriContext->getTranslatedSubjectObject());
     $transSubject = new \stdClass();
     $uriContext->setTranslatedSubjectObject($transSubject);
     $this->assertSame($transSubject, $uriContext->getTranslatedSubjectObject());
     // uri schema
     $this->assertEquals('/uri/', $uriContext->getUriSchema());
     // token provider configs
     $this->assertEquals(array('token'), $uriContext->getTokenProviderConfigs());
     // conflict resolver configs
     $this->assertEquals(array('conflict'), $uriContext->getConflictResolverConfig());
     // defaults
     $this->assertEquals(array('default1' => 'value1'), $uriContext->getDefaults());
 }