@@ -0,0 +1,1660 @@
+/*%0A * Copyright 2020 Red Hat, Inc. and/or its affiliates.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * %0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A*/%0A%0Apackage org.kie.server.integrationtests.controller;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport javax.ws.rs.client.Client;%0Aimport javax.ws.rs.client.ClientBuilder;%0Aimport javax.ws.rs.client.WebTarget;%0Aimport javax.ws.rs.core.Response;%0A%0Aimport org.jsoup.Jsoup;%0Aimport org.junit.Test;%0Aimport org.kie.server.integrationtests.config.TestConfig;%0A%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Apublic class KieControllerSwaggerIntegrationTest extends KieControllerManagementBaseTest %7B%0A%0A    @Test%0A    public void testSwaggerDocs() throws Exception %7B%0A        Client httpClient = ClientBuilder.newClient();%0A        %0A        String docsUri = TestConfig.getControllerHttpUrl() + %22/../../docs/%22;%0A        WebTarget clientRequest = httpClient.target(docsUri);%0A        Response response = clientRequest.request().get();%0A        %0A        assertEquals(200, response.getStatus());%0A        assertNotNull(response.getEntity());%0A        String html = response.readEntity(String.class);%0A        %0A        assertThat(Jsoup.parse(html).title()).isEqualTo(%22Controller Documentation%22);%0A     %7D%0A%7D%0A

Add test to access Swagger docs for jBPM headless controller (#2002)