public static Map<String, String> parseParams(HttpRequest request) {
    if (request instanceof HttpGet) {
      return parseParamsForGet(request);
    }
    if (request instanceof HttpEntityEnclosingRequestBase) {
      return parseParamsForRequestWithEntity((HttpEntityEnclosingRequestBase) request);
    }
    return new LinkedHashMap<>();
  }
@Test
  public void parseParams_shouldParseParamsFromGetRequests() throws Exception {
    HttpGet httpGet = new HttpGet("http://example.com/path?foo=bar");
    Map<String, String> parsed = ParamsParser.parseParams(httpGet);
    assertThat(parsed.size()).isEqualTo(1);
    assertThat(parsed.get("foo")).isEqualTo("bar");
  }