added socket stub method and test to make sure callback is called