Add tests for reordering tasks