public function testGetRouteNameForItemRouteOnCacheHit()
{
$cacheItemProphecy = $this->prophesize(CacheItemInterface::class);
$cacheItemProphecy->isHit()->willReturn(true)->shouldBeCalled();
$cacheItemProphecy->get()->willReturn('some_item_route')->shouldBeCalled();
$cacheItemPoolProphecy = $this->prophesize(CacheItemPoolInterface::class);
$cacheItemPoolProphecy->getItem(Argument::type('string'))->willReturn($cacheItemProphecy);
$cacheItemPoolProphecy->save($cacheItemProphecy)->shouldNotBeCalled();
$decoratedProphecy = $this->prophesize(RouteNameResolverInterface::class);
$decoratedProphecy->getRouteName(Argument::cetera())->shouldNotBeCalled();
$cachedRouteNameResolver = new CachedRouteNameResolver($cacheItemPoolProphecy->reveal(), $decoratedProphecy->reveal());
$actual = $cachedRouteNameResolver->getRouteName('AppBundle\\Entity\\User', false);
$this->assertSame('some_item_route', $actual);
}