Fixes according to review.

- Corrected Indent
- Closing socket
- Added MockWebServerRule
- Refined test