Added 4 API methods with tests to validate success / error callbacks.