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

import com.jayway.restassured.response.Response;
import org.junit.Test;
import uk.ac.ebi.atlas.acceptance.rest.fixtures.RestAssuredFixture;

import static com.jayway.restassured.RestAssured.get;

public class GenePageControllerIT extends RestAssuredFixture {

    @Test
    public void genePageRedirectQueryController(){
        Response response = get("/query?geneQuery=MGI:3A108498");

        response.then().assertThat().statusCode(200);
        response.then().assertThat().contentType("text/html");
    }

}

@@ -232,18 +232,70 @@
 ssured.g
-et
+iven;%0Aimport static org.hamcrest.CoreMatchers.endsWith
 ;%0A%0Apubli
@@ -383,106 +383,186 @@
 oid 
-genePageRedirectQueryController()%7B%0A        Response response = get(%22/query?geneQuery=MGI:3A108498%22
+mgiRedirects()%7B%0A        String from = %22/genes/MGI:88495%22;%0A        String to = %22/genes/ENSMUSG00000063889%22;%0A%0A        Response response = given().redirects().follow(false).get(from
 );%0A%0A
@@ -613,11 +613,11 @@
 ode(
-200
+302
 );%0A 
@@ -656,31 +656,39 @@
 t().
-contentType(%22text/html%22
+header(%22Location%22, endsWith(to)
 );%0A 

make test useful