### Question:
GcpJobStatusService implements JobStatusService { @Override public IngestJobStatusDto getStatus(String jobId, MessageHeaders headers) { log.debug("Request for getting a injection job status. JobId: {}, headers: {}", jobId, headers); String authorizationToken = extractHeaderByName(headers, OsduHeader.AUTHORIZATION); String partition = extractHeaderByName(headers, OsduHeader.PARTITION); authenticationService .checkAuthentication(authorizationToken, partition); IngestJobStatusDto jobStatusDto = ingestJobRepository.findById(jobId) .map(ingestJobMapper::toStatusDto) .orElseThrow(() -> new IngestJobNotFoundException("Not ingest job found by id = " + jobId)); log.debug("Found the injection job status: {}", jobStatusDto); return jobStatusDto; }  @Override IngestJobStatusDto getStatus(String jobId, MessageHeaders headers); @Override IngestJob get(String jobId); @Override String initInjectJob(); @Override void updateJobStatus(String jobId, IngestJobStatus status); @Override void save(IngestJob ingestJob);  }### Answer:
@Test public void shouldGetStatusOfIngestJob() { MessageHeaders headers = getMessageHeaders(); given(ingestJobRepository.findById(INGEST_JOB_ID)).willReturn(Optional.of(getIngestJob())); IngestJobStatusDto jobStatusDto = jobStatusService.getStatus(INGEST_JOB_ID, headers); then(jobStatusDto).isEqualTo(IngestJobStatusDto.builder() .id(INGEST_JOB_ID) .status(IngestJobStatus.COMPLETE) .srns(SRNS) .build()); InOrder inOrder = inOrder(authenticationService, ingestJobRepository, ingestJobMapper); inOrder.verify(authenticationService).checkAuthentication(AUTHORIZATION_TOKEN, PARTITION); inOrder.verify(ingestJobRepository).findById(INGEST_JOB_ID); inOrder.verify(ingestJobMapper).toStatusDto(any()); inOrder.verifyNoMoreInteractions(); }
@Test public void shouldThrowNotFoundExceptionWhenUnableToGetIngestJobStatus() { MessageHeaders headers = getMessageHeaders(); given(ingestJobRepository.findById(INGEST_JOB_ID)).willReturn(Optional.empty()); Throwable thrown = catchThrowable(() -> jobStatusService.getStatus(INGEST_JOB_ID, headers)); then(thrown) .isInstanceOf(IngestJobNotFoundException.class) .hasMessage("Not ingest job found by id = " + INGEST_JOB_ID); InOrder inOrder = inOrder(authenticationService, ingestJobRepository, ingestJobMapper); inOrder.verify(authenticationService).checkAuthentication(AUTHORIZATION_TOKEN, PARTITION); inOrder.verify(ingestJobRepository).findById(INGEST_JOB_ID); inOrder.verifyNoMoreInteractions(); }