Add unit tests

Add first unit test with socket mock.