Made TaskRunner more testable