DynamoJobRepository extends AbstractDynamoRepository implements JobRepository { @Override public Optional<JobInfo> findOne(String jobId) { return findOneItem(jobId).map(this::decode); } DynamoJobRepository(DynamoDbClient dynamoDbClient, final String tableName, int pageSize); @Override Optional<JobInfo> findOne(String jobId); @Override List<JobInfo> findLatest(int maxCount); @Override List<JobInfo> findLatestJobsDistinct(); @Override List<JobInfo> findLatestBy(String type, int maxCount); @Override List<JobInfo> findRunningWithoutUpdateSince(OffsetDateTime timeOffset); @Override List<JobInfo> findAll(); @Override List<JobInfo> findAllJobInfoWithoutMessages(); @Override List<JobInfo> findByType(String jobType); @Override JobInfo createOrUpdate(final JobInfo job); @Override void removeIfStopped(String jobId); @Override JobInfo.JobStatus findStatus(String jobId); @Override void appendMessage(String jobId, JobMessage jobMessage); @Override void setJobStatus(String jobId, JobInfo.JobStatus jobStatus); @Override void setLastUpdate(String jobId, OffsetDateTime lastUpdate); @Override long size(); @Override void deleteAll();  }
@Test void shouldReturnAbsentStatus() { DynamoJobRepository repository = new DynamoJobRepository(getDynamoDbClient(), JOBS_TABLE_NAME, 10); assertThat(repository.findOne("some-nonexisting-job-id"), isAbsent()); }