This is a pretty elegant way to test callbacks.