@Test(expected = IllegalArgumentException.class)
public void testEncodeValidationFail() throws Exception {

  RequestParamsExtractor<Integer> extractor =
      getMockExtractor(1, ImmutableMap.of("param1", "value+1", "param2", "value+2+&"));
  RequestUrlParamsEncoder<Integer> encoder = new RequestUrlParamsEncoder<>(extractor, true);
  encoder.encode(1);
}