<commit_before>package annis.gui.servlets;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@ActiveProfiles("desktop")
class CitationRedirectionServletTest {

  @LocalServerPort
  private int port;

  private TestRestTemplate restTemplate;

  private final static String ORIGINAL_URL = "random-url";

  @BeforeEach
  void setup() {
    this.restTemplate = new TestRestTemplate();
  }

  @Test
  void testRedirect() {
    ResponseEntity<String> response = restTemplate
        .getForEntity("http://localhost:" + port + "/Cite/" + ORIGINAL_URL, String.class);
    assertEquals(HttpStatus.FOUND, response.getStatusCode());
    assertEquals("/", response.getHeaders().get("Location"));
  }

}<commit_msg>The header is an array<commit_after>package annis.gui.servlets;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@ActiveProfiles("desktop")
class CitationRedirectionServletTest {

  @LocalServerPort
  private int port;

  private TestRestTemplate restTemplate;

  private final static String ORIGINAL_URL = "random-url";

  @BeforeEach
  void setup() {
    this.restTemplate = new TestRestTemplate();
  }

  @Test
  void testRedirect() {
    ResponseEntity<String> response = restTemplate
        .getForEntity("http://localhost:" + port + "/Cite/" + ORIGINAL_URL, String.class);
    assertEquals(HttpStatus.FOUND, response.getStatusCode());
    assertEquals("http://localhost:" + port + "/", response.getHeaders().get("Location").get(0));
  }

}
{'fraction_non_alphanumeric': 0.11387485425573261, 'fraction_numerical': 0.000388651379712398, 'mean_word_length': 5.634020618556701, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6346858', 'n_tokens_mistral': 739, 'n_tokens_neox': 729, 'n_words': 129}