### Question:
MetricJob { @ConditionalOnProperty(value = "scheduling.enabled", havingValue = "true") @Scheduled(cron = "0 * * * * *") @Retryable public void send() { List<Metric> metrics = metricService.collect(); metricService.send(metrics); }  @ConditionalOnProperty(value = "scheduling.enabled", havingValue = "true") @Scheduled(cron = "0 * * * * *") @Retryable void send();  }### Answer:
@Test public void sendTest() { final List<Metric> metrics = List.of( Metric.builder() .name("metric1") .time(1L) .value(BigDecimal.ONE) .build(), Metric.builder() .name("metric2") .time(2L) .value(BigDecimal.valueOf(2L)) .build() ); when(metricService.collect()).thenReturn(metrics); doNothing().when(metricService).send(metrics); metricJob.send(); verify(metricService).collect(); verify(metricService).send(metrics); }