Unit tests for the callback parameter

These are the unit tests from my original pull request separated out into their own request.