@Test
public void testGetJobs() throws Exception {

    Vector<String> jobGroupNames = new Vector<>();
    jobGroupNames.add("group");
    Mockito.when(scheduler.getJobGroupNames()).thenReturn(jobGroupNames);
    Set<JobKey> set = new HashSet<>();
    set.add(new JobKey("name", "group"));
    Mockito.when(scheduler.getJobKeys((GroupMatcher) anyObject())).thenReturn(set);
    Mockito.when(scheduler.getJobDetail((JobKey) anyObject())).thenReturn(new JobDetailImpl("name", "group", MockJob.class));
    List v = new Vector<>();
    addMockTrigger(v, "name", "group");
    Mockito.when(scheduler.getTriggerState((TriggerKey) Mockito.anyObject())).thenReturn(Trigger.TriggerState.BLOCKED);
    Mockito.when(scheduler.getTriggersOfJob((JobKey) anyObject())).thenReturn(v);
    assertTrue(toTest.getJobs().size() == 1);
}