Add unit tests for commit operation in edge cases