test: Simulate function call for callback correctly