@Test
public void shouldReturnRunningJobsDocument() {

    when(jobMetaRepository.findAllJobTypes()).thenReturn(new HashSet<>(asList("someType", "someOtherType")));
    when(jobMetaRepository.getRunningJob("someType")).thenReturn("someId");
    when(jobMetaRepository.getRunningJob("someOtherType")).thenReturn("someOtherId");
    assertThat(jobMetaService.runningJobs(), containsInAnyOrder(
            new RunningJob("someId", "someType"),
            new RunningJob("someOtherId", "someOtherType")
    ));
}