@SuppressWarnings("unchecked")
@Test
public void testDeleteSomeJobsOfUser() {

    AdminJobs resource = new AdminJobs();
    // Inject fake OSGi service UkelonnService
    UkelonnService ukelonn = mock(UkelonnService.class);
    when(ukelonn.deleteJobsFromAccount(anyInt(), anyList())).thenReturn(getFirstJodJob());
    resource.ukelonn = ukelonn;
    // Set up the POST argument for the delete
    Account account = getJodAccount();
    List<Transaction> jobs = getJodJobs();
    List<Integer> idsOfJobsToDelete = Arrays.asList(jobs.get(0).getId());
    AccountWithJobIds accountWithJobIds = new AccountWithJobIds(account, idsOfJobsToDelete);
    // Do the delete
    List<Transaction> jobsAfterDelete = resource.delete(accountWithJobIds);
    assertEquals(1, jobsAfterDelete.size());
}