@Test
public void shouldStoreAndRetrieveAllJobInfoWithoutMessages() {

    // given
    final JobInfo job1 = someJobInfo("http://localhost/foo");
    final JobInfo job2 = someJobInfo("http://localhost/bar");
    repo.createOrUpdate(job1);
    repo.createOrUpdate(job2);
    // when
    final List<JobInfo> jobInfos = repo.findAllJobInfoWithoutMessages();
    // then
    assertThat(jobInfos, hasSize(2));
    assertThat(jobInfos.get(0), is(job1.copy().setMessages(emptyList()).build()));
    assertThat(jobInfos.get(1), is(job2.copy().setMessages(emptyList()).build()));
}