@Test
public void testProgressiveExpirationTimeOrDefaultWhenTheTtlFactorIsSetWithNegativeNumber()
{

    // Given
    final int aTtlFactor = -20;
    final int oneDayDiff = 1;
    final int theExpectedTtlFactor = 1;
    final Date aDateBeforeToday = calculateDateFrom( new Date(), minus( oneDayDiff ), DATE );
    // When
    when( systemSettingManager.getSystemSetting( ANALYTICS_CACHE_PROGRESSIVE_TTL_FACTOR ) )
        .thenReturn( aTtlFactor );
    final long expirationTime = analyticsCacheSettings.progressiveExpirationTimeOrDefault( aDateBeforeToday );
    // Then
    assertThat( expirationTime, is( valueOf( theExpectedTtlFactor ) ) );
}