### Question:
UriUtils { public static void copyRequestData(HttpRequest origRequest, HttpRequest req) throws GadgetException { req.setMethod(origRequest.getMethod()); try { if (origRequest.getMethod().equalsIgnoreCase("post")) { req.setPostBody(origRequest.getPostBody()); } } catch (IOException e) { throw new GadgetException(GadgetException.Code.INTERNAL_SERVER_ERROR, e); } } private  UriUtils(); static boolean isValidHeaderName(String name); static boolean isValidHeaderValue(String val); static void copyResponseHeadersAndStatusCode(
      HttpResponse data, HttpResponseBuilder resp,
      boolean remapInternalServerError,
      boolean setHeaders,
      DisallowedHeaders... disallowedResponseHeaders); static void copyRequestHeaders(HttpRequest origRequest,
                                        HttpRequest req,
                                        DisallowedHeaders... disallowedRequestHeaders); static void copyRequestData(HttpRequest origRequest,
                                     HttpRequest req); static void maybeRewriteContentType(HttpRequest req, HttpResponseBuilder response); static String getContentTypeWithoutCharset(String content); static final String CHARSET; }### Answer:
@Test public void testCopyRequestData() throws Exception { HttpRequest origRequest = new HttpRequest(Uri.parse("http: origRequest.setMethod("Post"); String data = "hello world"; origRequest.setPostBody(data.getBytes()); HttpRequest req = new HttpRequest(Uri.parse( "http: UriUtils.copyRequestData(origRequest, req); assertEquals(data, req.getPostBodyAsString()); }