Better tests and error messages for TaskResource