TimerValues { @Bean public String getCVCRate(TimerConfigurationType timerConfiguration) { String timerName = "CVC renewal check"; if (timerConfiguration != null && timerConfiguration.getCertRenewal() != null) { TimerType certRenewal = timerConfiguration.getCertRenewal(); if (certRenewal.getLength() != 0 && certRenewal.getUnit() != 0) { String rate = String.valueOf(getUnitOfTime(certRenewal.getUnit()) * certRenewal.getLength()); logRateForTimer(timerName, rate); return rate; } } String rate = String.valueOf(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 testGetCVCRate() { TimerValues timerValues = new TimerValues(); String cvcRate = timerValues.getCVCRate(null); final String defaultRate = String.valueOf(TimerValues.HOUR); Assertions.assertEquals(defaultRate, cvcRate); TimerConfigurationType timerConfiguration = new TimerConfigurationType(); cvcRate = timerValues.getCVCRate(timerConfiguration); Assertions.assertEquals(defaultRate, cvcRate); TimerType cvcTimer = new TimerType(); cvcTimer.setUnit(Calendar.HOUR_OF_DAY); cvcTimer.setLength(10); timerConfiguration.setCertRenewal(cvcTimer); cvcRate = timerValues.getCVCRate(timerConfiguration); Assertions.assertEquals(String.valueOf(10 * 60 * 60 * 1000), cvcRate); }