Added unittest to scheduleInterpolateTask, fixed some basic bugs.