added more unit tests and fixed and issue where atomic operation commit race condition would fail