Test promote/demote() function