@Test
public void testComputeEndingDateIsAheadOfNowAndCacheFactorIsPositive()
{

    // Given
    final int tenDaysAhead = 10;
    final Integer aPositiveCachingFactor = 1;
    final Date beginningDate = new Date();
    final Date endingDate = calculateDateFrom( beginningDate, plus( tenDaysAhead ), DATE );
    final long expectedTtl = DEFAULT_MULTIPLIER * aPositiveCachingFactor;
    // When
    when( systemSettingManager.getSystemSetting(ANALYTICS_CACHE_PROGRESSIVE_TTL_FACTOR) )
        .thenReturn( aPositiveCachingFactor );
    final long actualTtl = new TimeToLive( endingDate, aPositiveCachingFactor ).compute();
    // Then
    assertThat( actualTtl, is( equalTo( expectedTtl ) ) );
}