@Test
public void testProgressiveExpirationTimeOrDefaultWhenTheTtlFactorIsNotSet()
{

    // Given
    final int theDefaultTtlFactor = (Integer) ANALYTICS_CACHE_PROGRESSIVE_TTL_FACTOR.getDefaultValue();
    final int oneDayDiff = 1;
    final long theExpectedTtl = theDefaultTtlFactor * oneDayDiff; // See TimeToLive.compute()
    final Date aDateBeforeToday = calculateDateFrom( new Date(), minus( oneDayDiff ), DATE );
    // When
    when( systemSettingManager.getSystemSetting( ANALYTICS_CACHE_PROGRESSIVE_TTL_FACTOR ) )
        .thenReturn( theDefaultTtlFactor );
    final long expirationTime = analyticsCacheSettings.progressiveExpirationTimeOrDefault( aDateBeforeToday );
    // Then
    assertThat( expirationTime, is( theExpectedTtl ) );
}