Test the commit function