test that the commit callback is correctly executed