public function resolveStoresResolvedUriPathInCacheIfNotFoundInCache()
{
$router = $this->getAccessibleMock(Router::class, ['createRoutesFromConfiguration']);
$this->inject($router, 'routerCachingService', $this->mockRouterCachingService);
$this->inject($router, 'systemLogger', $this->mockSystemLogger);
$routeValues = ['some' => 'route values'];
$resolvedUriPath = 'some/resolved/Request/Path';
$mockRoute1 = $this->getMockBuilder(Route::class)->getMock();
$mockRoute1->expects($this->once())->method('resolves')->with($routeValues)->will($this->returnValue(false));
$mockRoute2 = $this->getMockBuilder(Route::class)->getMock();
$mockRoute2->expects($this->once())->method('resolves')->with($routeValues)->will($this->returnValue(true));
$mockRoute2->expects($this->atLeastOnce())->method('getResolvedUriPath')->will($this->returnValue($resolvedUriPath));
$router->_set('routes', [$mockRoute1, $mockRoute2]);
$this->mockRouterCachingService->expects($this->once())->method('storeResolvedUriPath')->with($resolvedUriPath, $routeValues);
$this->assertSame($resolvedUriPath, $router->resolve($routeValues));
}