setWithCAS with tests