test: improve addTaskFunction() tests