### Question:
SpringScheduledProcessor { AnnotationValue buildEveryParam(List<AnnotationValue> springAnnotationValues) { long fixedRate = getLongValueFromParam(springAnnotationValues, "fixedRate"); String fixedRateString; fixedRateString = Duration.ofMillis(fixedRate).toString(); AnnotationValue every = AnnotationValue.createStringValue("every", fixedRateString); return every; }  @BuildStep List<UnremovableBeanBuildItem> unremovableBeans();  }### Answer:
@Test public void testBuildEveryParam() { final MethodInfo target = index.getClassByName(DotName.createSimple(SpringScheduledMethodsBean.class.getName())) .method("checkEverySecond"); AnnotationInstance annotation = target.annotation(SpringScheduledProcessor.SPRING_SCHEDULED); AnnotationValue annotationValue = springScheduledProcessor.buildEveryParam(annotation.values()); assertThat(annotationValue.name()).isEqualTo("every"); assertThat(annotationValue.value()).isEqualTo("PT1S"); }
@Test public void testBuildEveryParamFromInvalidFormat() { final MethodInfo target = index.getClassByName(DotName.createSimple(BeanWithScheduledMethods.class.getName())) .method("invalidFormatFixedRate"); AnnotationInstance annotation = target.annotation(SpringScheduledProcessor.SPRING_SCHEDULED); try { springScheduledProcessor.buildEveryParam(annotation.values()); fail(); } catch (IllegalArgumentException expected) { } }