DefaultJobStatusStore implements JobStatusStore, Initializable { @Override public void store(JobStatus status) { store(status, false); }  @Override void initialize(); @Override JobStatus getJobStatus(List<String> id); @Override void store(JobStatus status); @Override void storeAsync(JobStatus status); @Override void remove(List<String> id); @Override LoggerTail createLoggerTail(List<String> jobId, boolean readonly); void flushCache();  }
@Test void storeNullJobStatus() { this.store.store(null); }
@Test void storeJobStatusWithNullRequest() { JobStatus jobStatus = new DefaultJobStatus("type", null, null, null, null); this.store.store(jobStatus); }
@Test void storeJobStatusWithNullId() { JobStatus jobStatus = new DefaultJobStatus("type", new DefaultRequest(), null, null, null); this.store.store(jobStatus); }
@Test void storeUnserializableJobStatus() { List<String> id = Arrays.asList("test"); DefaultRequest request = new DefaultRequest(); request.setId(id); JobStatus jobStatus = new UnserializableJobStatus("type", request, null, null, null); this.store.store(jobStatus); assertFalse(new File(this.storeDirectory, "test/status.xml").exists()); }
@Test void storeUnserializedJobStatus() { List<String> id = Arrays.asList("test"); DefaultRequest request = new DefaultRequest(); request.setId(id); request.setStatusSerialized(false); JobStatus jobStatus = new DefaultJobStatus("type", request, null, null, null); this.store.store(jobStatus); assertFalse(new File(this.storeDirectory, "test/status.xml").exists()); }