@Test void testGetScheduleTimeJobNotFound() { when(restTemplate.getForObject(any(), any(), anyString())).thenThrow(NotFound.class); assertThatThrownBy(() -> tested.getScheduledTime("123")).isInstanceOf(JobNotFoundException.class); verify(restTemplate).getForObject(tested.getJobsServiceUri() + "/{id}", Job.class, "123"); }
@Override public ZonedDateTime getScheduledTime(String id) { try { return restTemplate.getForObject(getJobsServiceUri() + "/{id}", Job.class, id).getExpirationTime(); } catch (NotFound e) { throw new JobNotFoundException(id); } catch (RestClientException e) { throw new RuntimeException(e); } }
SpringRestJobsService extends RestJobsService { @Override public ZonedDateTime getScheduledTime(String id) { try { return restTemplate.getForObject(getJobsServiceUri() + "/{id}", Job.class, id).getExpirationTime(); } catch (NotFound e) { throw new JobNotFoundException(id); } catch (RestClientException e) { throw new RuntimeException(e); } } }
SpringRestJobsService extends RestJobsService { @Override public ZonedDateTime getScheduledTime(String id) { try { return restTemplate.getForObject(getJobsServiceUri() + "/{id}", Job.class, id).getExpirationTime(); } catch (NotFound e) { throw new JobNotFoundException(id); } catch (RestClientException e) { throw new RuntimeException(e); } } @Autowired  SpringRestJobsService(
            @Value("${kogito.jobs-service.url}") String jobServiceUrl,
            @Value("${kogito.service.url}") String callbackEndpoint,
            @Autowired(required=false) RestTemplate restTemplate);   SpringRestJobsService(); }
SpringRestJobsService extends RestJobsService { @Override public ZonedDateTime getScheduledTime(String id) { try { return restTemplate.getForObject(getJobsServiceUri() + "/{id}", Job.class, id).getExpirationTime(); } catch (NotFound e) { throw new JobNotFoundException(id); } catch (RestClientException e) { throw new RuntimeException(e); } } @Autowired  SpringRestJobsService(
            @Value("${kogito.jobs-service.url}") String jobServiceUrl,
            @Value("${kogito.service.url}") String callbackEndpoint,
            @Autowired(required=false) RestTemplate restTemplate);   SpringRestJobsService(); @PostConstruct void initialize(); @Override String scheduleProcessJob(ProcessJobDescription description); @Override String scheduleProcessInstanceJob(ProcessInstanceJobDescription description); @Override boolean cancelJob(String id); @Override ZonedDateTime getScheduledTime(String id); }
SpringRestJobsService extends RestJobsService { @Override public ZonedDateTime getScheduledTime(String id) { try { return restTemplate.getForObject(getJobsServiceUri() + "/{id}", Job.class, id).getExpirationTime(); } catch (NotFound e) { throw new JobNotFoundException(id); } catch (RestClientException e) { throw new RuntimeException(e); } } @Autowired  SpringRestJobsService(
            @Value("${kogito.jobs-service.url}") String jobServiceUrl,
            @Value("${kogito.service.url}") String callbackEndpoint,
            @Autowired(required=false) RestTemplate restTemplate);   SpringRestJobsService(); @PostConstruct void initialize(); @Override String scheduleProcessJob(ProcessJobDescription description); @Override String scheduleProcessInstanceJob(ProcessInstanceJobDescription description); @Override boolean cancelJob(String id); @Override ZonedDateTime getScheduledTime(String id);  }