@Test
public void shouldNotScheduleCompletedTask() {

    task1.setStatus(Task.Status.COMPLETED);
    List<Task> mappedTasks = new DoWhileTaskMapper(metadataDAO).getMappedTasks(taskMapperContext);
    assertNotNull(mappedTasks);
    assertEquals(mappedTasks.size(), 1);
}