public function testGetRouteNameForCollectionRouteOnCacheMiss()
{
$cacheItemProphecy = $this->prophesize(CacheItemInterface::class);
$cacheItemProphecy->isHit()->willReturn(false)->shouldBeCalled();
$cacheItemProphecy->set('some_collection_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', true)->willReturn('some_collection_route')->shouldBeCalled();
$cachedRouteNameResolver = new CachedRouteNameResolver($cacheItemPoolProphecy->reveal(), $decoratedProphecy->reveal());
$actual = $cachedRouteNameResolver->getRouteName('AppBundle\\Entity\\User', true);
$this->assertSame('some_collection_route', $actual);
}