@Test
public void testGetAnalyticsCacheControlForWhenTimeToLiveIsPositive()
{

    // Given
    final long positiveTimeToLive = 60;
    final Date aDate = new Date();
    final CacheControl expectedCacheControl = stubPublicCacheControl ( positiveTimeToLive );
    final Cacheability setCacheability = PUBLIC;
    // When
    when( systemSettingManager.getSystemSetting( CACHEABILITY ) ).thenReturn( setCacheability );
    when( analyticsCacheSettings.progressiveExpirationTimeOrDefault( aDate ) ).thenReturn( positiveTimeToLive );
    final CacheControl actualCacheControl = webCache.getCacheControlFor( aDate );
    // Then
    assertThat( actualCacheControl.toString(), is( expectedCacheControl.toString() ) );
}