/*
 * Copyright 2008-2013 Microarray Informatics Team, EMBL-European Bioinformatics Institute
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *
 * For further details of the Gene Expression Atlas project, including source code,
 * downloads and documentation, please see:
 *
 * http://gxa.github.com/gxa
 */

package uk.ac.ebi.atlas.acceptance.rest.fixtures;

import com.jayway.restassured.RestAssured;
import com.jayway.restassured.authentication.BasicAuthScheme;
import com.jayway.restassured.builder.RequestSpecBuilder;
import org.apache.commons.lang3.StringUtils;
import org.junit.BeforeClass;

public class RestAssuredFixture {

    public static final String SELENIUM_TEST_HOST_PROPERTY_KEY = "selenium.test.host";

    public static final String SELENIUM_TEST_PORTNUMBER_PROPERTY_KEY = "selenium.test.portnumber";

    @BeforeClass
    public static void initRestAssured(){
        String hostname = System.getProperty(SELENIUM_TEST_HOST_PROPERTY_KEY);
        if (StringUtils.isNotBlank(hostname)) {
            RestAssured.baseURI = "http://"+hostname;
        }

        RestAssured.basePath = "/gxa";

        String portNumber = System.getProperty(SELENIUM_TEST_PORTNUMBER_PROPERTY_KEY);
        if (StringUtils.isBlank(portNumber)) {
            portNumber = "9090";
        }

        RestAssured.port = new Integer(portNumber);

        System.out.println(String.format("<initRestAssured> base = %s:%s%s", RestAssured.baseURI, RestAssured.port, RestAssured.basePath));

    }

}

@@ -1843,24 +1843,102 @@
 rtNumber);%0A%0A
+        RestAssured.requestSpecification = new RequestSpecBuilder().build();%0A%0A
         Syst

fix test (hopefully!)