splitted tests for socketServer into two separate functions