TimerValues { @Bean public String getDeltaBlacklistRate(TimerConfigurationType timerConfiguration) { String timerName = "Delta blacklist renewal"; if (timerConfiguration != null && timerConfiguration.getBlacklistRenewal() != null) { TimerType blacklistRenewal = timerConfiguration.getBlacklistRenewal(); if (blacklistRenewal.getUnit() != 0 && blacklistRenewal.getLength() != 0) { String rate = String.valueOf(getUnitOfTime(blacklistRenewal.getUnit()) * blacklistRenewal.getLength()); logRateForTimer(timerName, rate); return rate; } } String rate = String.valueOf(2 * HOUR); logRateForTimer(timerName, rate); return rate; }  @Bean String getFullBlacklistRate(); @Bean String getDeltaBlacklistRate(TimerConfigurationType timerConfiguration); @Bean String getCVCRate(TimerConfigurationType timerConfiguration); @Bean String getMasterDefectRate(TimerConfigurationType timerConfiguration); @Bean String getCrlRate(TimerConfigurationType timerConfiguration); @Bean String getKeyLockRate();  }
@Test void testGetDeltaBlacklistRate() { TimerValues timerValues = new TimerValues(); String deltaBlacklistRate = timerValues.getDeltaBlacklistRate(null); final String defaultRate = String.valueOf(2 * TimerValues.HOUR); Assertions.assertEquals(defaultRate, deltaBlacklistRate); TimerConfigurationType timerConfiguration = new TimerConfigurationType(); deltaBlacklistRate = timerValues.getDeltaBlacklistRate(timerConfiguration); Assertions.assertEquals(defaultRate, deltaBlacklistRate); TimerType blackListTimer = new TimerType(); blackListTimer.setUnit(Calendar.MINUTE); blackListTimer.setLength(30); timerConfiguration.setBlacklistRenewal(blackListTimer); deltaBlacklistRate = timerValues.getDeltaBlacklistRate(timerConfiguration); Assertions.assertEquals(String.valueOf(30 * 60 * 1000), deltaBlacklistRate); }