code: public static Action resourceContent(URL resourceUrl) {
          try {
              final byte[] bytes = ResourceHelper.getBytes(resourceUrl);
  
              String fileExtension = FileHelper.getFileExtension(resourceUrl.getPath());
  
              Action mainAction = bytesContent(bytes);
  
              if (fileExtension.equalsIgnoreCase("xml")) {
                  mainAction = composite(contentType("application/xml"), mainAction);
              } else if (fileExtension.equalsIgnoreCase("json")) {
                  mainAction = composite(contentType("application/json"), mainAction);
              }
  
              return mainAction;
          } catch (IOException e) {
              throw new RuntimeException("Can not read resource for restito stubbing.");
          }
      }
docs: Writes content using the specified encoding and content-type of resource file to response.
  Tries to detect content type based on file extension. If can not detect, content-type is not set.
  For now there are following bindings:
  <ul>
  <li>.xml - `application/xml`</li>
  <li>.json - `application/xml`</li>
  </ul>