DefaultHttpJsonRequest implements HttpJsonRequest { @Override public HttpJsonRequest addQueryParam(@NotNull String name, @NotNull Object value) { requireNonNull(name, "Required non-null query parameter name"); requireNonNull(value, "Required non-null query parameter value"); if (queryParams == null) { queryParams = new ArrayList<>(DEFAULT_QUERY_PARAMS_LIST_SIZE); } queryParams.add(Pair.of(name, value)); return this; } protected  DefaultHttpJsonRequest(String url, String method); protected  DefaultHttpJsonRequest(String url); protected  DefaultHttpJsonRequest(Link link); @Override HttpJsonRequest setMethod(@NotNull String method); @Override HttpJsonRequest setBody(@NotNull Object body); @Override HttpJsonRequest setBody(@NotNull Map<String, String> map); @Override HttpJsonRequest setBody(@NotNull List<?> list); @Override HttpJsonRequest addQueryParam(@NotNull String name, @NotNull Object value); HttpJsonRequest addHeader(@NotNull String name, @NotNull String value); @Override HttpJsonRequest setAuthorizationHeader(@NotNull String value); @Override HttpJsonRequest setTimeout(int timeout); @Override String getUrl(); @Override HttpJsonResponse request(); @Override String toString();  }
@Test(expectedExceptions = NullPointerException.class) public void shouldThrowNullPointerExceptionWhenQueryParamNameIsNull() throws Exception { new DefaultHttpJsonRequest("http: }
@Test(expectedExceptions = NullPointerException.class) public void shouldThrowNullPointerExceptionWhenQueryParamValueIsNull() throws Exception { new DefaultHttpJsonRequest("http: }