Add a callback function to verify the results in the unittest

If the std::function and bind could be used, the code can be refactored
better