    @Test
    public void testTriggleFromLastScheduleTime(){

        /*
         * insert previous task attempt
         */
        TaskAttempt attempt = new TaskAttempt();
        attempt.setTaskid(TASKID2);
        String instanceID = idFactory.newInstanceID(TASKID2);
        attempt.setInstanceid(instanceID);
        attempt.setAttemptid(idFactory.newAttemptID(instanceID));
        Calendar cal = Calendar.getInstance();
        cal.set(2012, Calendar.OCTOBER, 15, 10, 19, 0);
        attempt.setScheduletime(cal.getTime());
        attemptMapper.insert(attempt);
        
        
        /*
         * verify
         */
        Calendar now = Calendar.getInstance();
        now.set(2012, Calendar.OCTOBER, 19, 10, 19, 0);
        crontabTriggle.triggle(now.getTime());
        TaskAttemptExample example = new TaskAttemptExample();
        example.or();
        List<TaskAttempt> attempts = attemptMapper.selectByExample(example);
        assertEquals(4, attempts.size());
        
        cleanTableTaskAttempt();
    }