@@ -0,0 +1,3197 @@
+/**%0A * JBoss, Home of Professional Open Source.%0A * Copyright 2014-2019 Red Hat, Inc., and individual contributors%0A * as indicated by the @author tags.%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 * You may obtain a copy of the License at%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 */%0Apackage org.jboss.pnc.integration_new.endpoint;%0A%0Aimport org.jboss.arquillian.container.test.api.Deployment;%0Aimport org.jboss.arquillian.container.test.api.RunAsClient;%0Aimport org.jboss.arquillian.junit.Arquillian;%0Aimport org.jboss.pnc.client.ClientException;%0Aimport org.jboss.pnc.client.GroupBuildClient;%0Aimport org.jboss.pnc.client.RemoteCollection;%0Aimport org.jboss.pnc.client.RemoteResourceException;%0Aimport org.jboss.pnc.dto.Build;%0Aimport org.jboss.pnc.dto.GroupBuild;%0Aimport org.jboss.pnc.dto.response.Graph;%0Aimport org.jboss.pnc.integration_new.setup.Deployments;%0Aimport org.jboss.pnc.integration_new.setup.RestClientConfiguration;%0Aimport org.jboss.pnc.test.category.ContainerTest;%0Aimport org.jboss.shrinkwrap.api.spec.EnterpriseArchive;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0Aimport org.junit.experimental.categories.Category;%0Aimport org.junit.runner.RunWith;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport java.util.Iterator;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A@RunAsClient%0A@RunWith(Arquillian.class)%0A@Category(ContainerTest.class)%0Apublic class GroupBuildEndpointTest %7B%0A%0A    private static final Logger logger = LoggerFactory.getLogger(GroupBuildEndpointTest.class);%0A%0A    private static String groupBuildId1;%0A    private static GroupBuildClient anonymousClient = new GroupBuildClient(RestClientConfiguration.asAnonymous());%0A%0A    @Deployment%0A    public static EnterpriseArchive deploy() %7B%0A        return Deployments.testEar();%0A    %7D%0A%0A    @BeforeClass%0A    public static void prepareData() throws Exception %7B%0A%0A        Iterator%3CGroupBuild%3E it = anonymousClient.getAll().iterator();%0A%0A        groupBuildId1 = it.next().getId();%0A    %7D%0A%0A    @Test%0A    public void shouldGetGroupBuilds() throws RemoteResourceException %7B%0A        RemoteCollection%3CGroupBuild%3E all = anonymousClient.getAll();%0A%0A        assertThat(all).hasSize(2);%0A    %7D%0A%0A    @Test%0A    public void shouldGetSpecificGroupBuild() throws ClientException %7B%0A%0A        GroupBuild build = anonymousClient.getSpecific(groupBuildId1);%0A%0A        assertThat(build.getId()).isEqualTo(groupBuildId1);%0A        assertThat(build.getGroupConfig()).isNotNull();%0A        assertThat(build.getUser()).isNotNull();%0A        assertThat(build.getStartTime()).isNotNull();%0A        assertThat(build.getEndTime()).isNotNull();%0A        assertThat(build.getStatus()).isNotNull();%0A        assertThat(build.getTemporaryBuild()).isNotNull();%0A        assertThat(build.getGroupConfig()).isNotNull();%0A    %7D%0A%7D%0A

Add GroupBuildEndpointTest