@Test
void update() {

    // Given
    Job job = createStandardJob();
    int version = job.getVersion();
    job.setName("Different name");
    job.setEnabled(false);
    // When
    Job updatedJob = dao.update(job);
    // Then
    assertThat(updatedJob.getId()).isEqualTo(job.getId());
    assertThat(updatedJob.getVersion()).isEqualTo(version + 1);
    assertThat(updatedJob.getName()).isEqualTo("Different name");
    assertThat(updatedJob.isEnabled()).isFalse();
    // Then
    Job fetchedUpdatedJob = dao.fetch(updatedJob.getId()).get();
    assertThat(fetchedUpdatedJob.getId()).isEqualTo(job.getId());
    assertThat(fetchedUpdatedJob.getVersion()).isEqualTo(version + 1);
    assertThat(fetchedUpdatedJob.getName()).isEqualTo("Different name");
    assertThat(fetchedUpdatedJob.isEnabled()).isFalse();
}