fixed test by adding mock socket