Testing Commit of a class