Add unit test that ensures that an executing task doesn't get rescheduled

TRUNK-2695 implementing changes suggested in code review

TRUNK-2695 removed comments related to debugging