Added a test and fixed a task priority bug in assign class