package org.jboss.da.test.communication;

import static org.junit.Assert.assertTrue;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.da.communication.CommunicationException;
import org.jboss.da.communication.aprox.api.AproxConnector;
import org.jboss.da.communication.model.GA;
import org.jboss.da.test.AbstractArquillianTest;
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.junit.Test;
import org.junit.runner.RunWith;

import javax.inject.Inject;

import java.util.Arrays;
import java.util.List;

@RunWith(Arquillian.class)
public class AproxTest {

    @Inject
    AproxConnector aproxConnector;

    @Deployment
    public static EnterpriseArchive createDeployment() {
        return AbstractArquillianTest.createDeployment();
    }

    @Test
    public void testGetVersionsOfGA() throws CommunicationException {
        GA ga = new GA("org.jboss.apiviz", "apiviz");
        List<String> apivizTest = Arrays.asList(new String[] { "1.3.1.GA-redhat-1", "1.2.5.GA",
                "1.3.0.GA", "1.3.1.GA-redhat-2", "1.3.2.GA" });
        List<String> result = aproxConnector.getVersionsOfGA(ga);
        assertTrue(apivizTest.size() == result.size());
        assertTrue(apivizTest.containsAll(result));
        assertTrue(result.containsAll(apivizTest));
    }

}

@@ -943,24 +943,28 @@
 oss.
-apiviz%22, %22apiviz
+ballroom%22, %22ballroom
 %22);%0A
@@ -984,22 +984,24 @@
 String%3E 
-apiviz
+ballroom
 Test = A
@@ -1029,28 +1029,31 @@
 ng%5B%5D %7B %221.3.
-1.GA
+0.Final
 -redhat-1%22, 
@@ -1055,20 +1055,8 @@
 -1%22,
- %221.2.5.GA%22,
 %0A   
@@ -1075,47 +1075,50 @@
  %221.
-3.0.GA%22, %221.3.1.GA-redhat-2%22, %221.3.2.GA
+4.0.Final-redhat-1%22, %221.6.0.Final-redhat-1
 %22 %7D)
@@ -1208,93 +1208,152 @@
 rue(
-apivizTest.size() == result.size());%0A        assertTrue(apivizTest.containsAll(result
+result.size() %3E 0);%0A        // future releases might make the size of result to be bigger%0A        assertTrue(ballroomTest.size() %3C= result.size(
 ));%0A
@@ -1394,14 +1394,16 @@
 All(
-apiviz
+ballroom
 Test

Change artifact to check for version in test