RemoteRequest extends HttpServletRequestWrapper implements HttpRequest { @SneakyThrows static String encode(final String s, final String charset) { return URLEncoder.encode(s, charset); } RemoteRequest(final HttpServletRequest request, final FormRequestMode formRequestMode); @Override String getProtocolVersion(); @Override Origin getOrigin(); @Override String getRemote(); @Override String getHost(); @Override Optional<Integer> getPort(); @Override String getPath(); @Override String getQuery(); @Override HttpHeaders getHeaders(); @Override Charset getCharset(); @Override HttpRequest withBody(); @Override HttpRequest withoutBody(); @Override ServletInputStream getInputStream(); @Override BufferedReader getReader(); @Override byte[] getBody();  }
@Test void shouldThrow() { assertThrows(UnsupportedEncodingException.class, () -> RemoteRequest.encode("", "FOO")); }