class TimerValues {

  @Bean
  public String getMasterDefectRate(TimerConfigurationType timerConfiguration)
  {
    String timerName = "Master and defect list renewal";

    // Check for configuration value
    if (timerConfiguration != null && timerConfiguration.getMasterAndDefectListRenewal() != null)
    {
      TimerType renewal = timerConfiguration.getMasterAndDefectListRenewal();
      if (renewal.getLength() != 0 && renewal.getUnit() != 0)
      {
        String rate = String.valueOf(getUnitOfTime(renewal.getUnit()) * renewal.getLength());
        logRateForTimer(timerName, rate);
        return rate;
      }
    }

    // Set default value to every 2 hours
    String rate = String.valueOf(2 * HOUR);
    logRateForTimer(timerName, rate);
    return rate;
  }

}