Add unit tests for commit operation in edge cases

Add tests for edge cases mentioned by @lodejard in #96