Testing the commit method