Finished set up for test, setting up tests and socket functionality