Add compare and swap test