Adding atomicity tests to replace