Added wrapMethod in core utils

Useful for wrapping channel listeners in tests
Fixed api mock reponse parsing