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