NEW: OkHttpMockWebServer in tests and asome refactoring of code