@@ -0,0 +1,2160 @@
+package com.github.binout.asciidoctor.extensions;%0A%0Aimport com.sun.net.httpserver.Headers;%0Aimport com.sun.net.httpserver.HttpExchange;%0Aimport com.sun.net.httpserver.HttpHandler;%0Aimport com.sun.net.httpserver.HttpServer;%0Aimport org.asciidoctor.Asciidoctor;%0Aimport org.asciidoctor.Options;%0Aimport org.asciidoctor.OptionsBuilder;%0Aimport org.junit.AfterClass;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport java.io.IOException;%0Aimport java.io.OutputStream;%0Aimport java.net.InetSocketAddress;%0Aimport java.util.concurrent.Executors;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Apublic class UriIncludeProcessorTest %7B%0A%0A    private static HttpServer server;%0A%0A    @BeforeClass%0A    public static void startServer() throws IOException %7B%0A        InetSocketAddress addr = new InetSocketAddress(9999);%0A        server = HttpServer.create(addr, 0);%0A%0A        server.createContext(%22/hello%22, new HttpHandler() %7B%0A            @Override%0A            public void handle(HttpExchange httpExchange) throws IOException %7B%0A                Headers responseHeaders = httpExchange.getResponseHeaders();%0A                responseHeaders.set(%22Content-Type%22, %22text/plain%22);%0A                httpExchange.sendResponseHeaders(200, 0);%0A%0A                OutputStream responseBody = httpExchange.getResponseBody();%0A                responseBody.write(%22hello%22.getBytes());%0A                responseBody.close();%0A            %7D%0A        %7D);%0A        server.setExecutor(Executors.newCachedThreadPool());%0A        server.start();%0A    %7D%0A%0A    @AfterClass%0A    public static void stopServer()%7B%0A        server.stop(0);%0A    %7D%0A%0A    @Test%0A    public void should_get_content_from_server() %7B%0A        Asciidoctor asciidoctor = Asciidoctor.Factory.create();%0A        asciidoctor.javaExtensionRegistry().includeProcessor(UriIncludeProcessor.class);%0A        Options options = OptionsBuilder.options().backend(%22html5%22).get();%0A%0A        String rendered = asciidoctor.convert(%22include::http://127.0.0.1:9999/hello%5B%5D%22, options);%0A%0A        assertThat(rendered).isEqualTo(%0A                %22%3Cdiv class=%5C%22paragraph%5C%22%3E%5Cn%22 +%0A                        %22%3Cp%3Ehello%3C/p%3E%5Cn%22 +%0A                        %22%3C/div%3E%22);%0A    %7D%0A%0A%7D

add test for UriIncludeProcessor