### Question:
AvatarJob { @ConditionalOnProperty(value = "scheduling.enabled", havingValue = "true") @Scheduled(cron = "0 20 4 * * *") @Retryable public void slack() throws InterruptedException { byte[] chosenImage = cloudStorageService.chooseImage(); slackService.updateImage(chosenImage); metricService.log(AvatarType.SLACK); }  @ConditionalOnProperty(value = "scheduling.enabled", havingValue = "true") @Scheduled(cron = "0 0 4 * * *") @Retryable void bookmeter(); @ConditionalOnProperty(value = "scheduling.enabled", havingValue = "true") @Scheduled(cron = "0 10 4 * * *") @Retryable void gravatar(); @ConditionalOnProperty(value = "scheduling.enabled", havingValue = "true") @Scheduled(cron = "0 20 4 * * *") @Retryable void slack(); @ConditionalOnProperty(value = "scheduling.enabled", havingValue = "true") @Scheduled(cron = "0 30 4 * * *") @Retryable void twitter();  }### Answer:
@Test @SneakyThrows public void slackTest() { final byte[] imageBytes = new byte[]{0x01, 0x02, 0x03}; when(cloudStorageService.chooseImage()).thenReturn(imageBytes); doNothing().when(slackService).updateImage(imageBytesCaptor.capture()); doNothing().when(metricService).log(AvatarType.SLACK); avatarJob.slack(); verify(cloudStorageService).chooseImage(); verify(slackService).updateImage(any()); verify(metricService).log(AvatarType.SLACK); assertArrayEquals(imageBytes, imageBytesCaptor.getValue()); }