@Test
public void testUpdateJob() {

    JobStore store = getJobStore();
    Job<BatchJobExt> job = createBatchJobObject();
    store.init().await();
    store.storeJob(job).await();
    Pair<List<Job<?>>, Integer> jobsAndErrors = store.retrieveJobs().toBlocking().first();
    assertThat(jobsAndErrors.getLeft().get(0)).isEqualTo(job);
    Job<BatchJobExt> newJob = job.toBuilder()
            .withStatus(JobStatus.newBuilder().withState(JobState.Finished).build())
            .build();
    store.updateJob(newJob).await();
    Pair<List<Job<?>>, Integer> newJobsAndErrors = store.retrieveJobs().toBlocking().first();
    assertThat(newJobsAndErrors.getLeft().get(0)).isEqualTo(newJob);
}