<commit_before>package de.otto.edison.acceptance;

import org.testng.annotations.Test;

import java.io.IOException;

import static de.otto.edison.acceptance.api.StatusApi.*;
import static de.otto.edison.testsupport.dsl.Then.*;
import static de.otto.edison.testsupport.dsl.When.when;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;

public class StatusControllerAcceptanceTest {

    @Test
    public void shouldGetApplicationStatus() throws IOException {
        when(
                the_internal_status_is_retrieved_as("application/json")
        );

        then(
                assertThat(the_status_code().value(), is(200)),
                and(
                        assertThat(the_returned_json().at("/application/status").asText(), is("WARNING"))),
                and(
                        assertThat(the_returned_json().at("/application/name").asText(), is("teststatus"))
                )
        );
    }

    @Test
    public void shouldGetApplicationStatusDetailsAsJson() throws IOException {
        when(
                the_internal_status_is_retrieved_as("application/json")
        );

        then(
                assertThat(the_status_code().value(), is(200)),
                and(
                        assertThat(the_returned_json().at("/application/statusDetails/foo/status").asText(), is("OK"))
                ),
                and(
                        assertThat(the_returned_json().at("/application/statusDetails/bar/status").asText(), is("WARNING"))
                )
        );
    }

    @Test
    public void shouldGetApplicationStatusWithVcsInformation() throws IOException {
        when(
                the_internal_status_is_retrieved_as("application/json")
        );

        then(
                assertThat(the_status_code().value(), is(200)),
                and(
                        assertThat(the_returned_json().at("/application/version").asText(), is("unknown"))
                ),
                and(
                        assertThat(the_returned_json().at("/application/commit").asText(), is("unknown"))
                )
        );
    }

    @Test
    public void shouldGetApplicationStatusAsHtml() throws IOException {
        when(
                the_internal_status_is_retrieved_as("text/html")
        );

        then(
                assertThat(the_status_code().value(), is(200)),
                and(
                    assertThat(the_returned_content(), startsWith("<html"))
                )
        );
    }
}
<commit_msg>Fixed broken test<commit_after>package de.otto.edison.acceptance;

import org.testng.annotations.Test;

import java.io.IOException;

import static de.otto.edison.acceptance.api.StatusApi.*;
import static de.otto.edison.testsupport.dsl.Then.*;
import static de.otto.edison.testsupport.dsl.When.when;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;

public class StatusControllerAcceptanceTest {

    @Test
    public void shouldGetApplicationStatus() throws IOException {
        when(
                the_internal_status_is_retrieved_as("application/json")
        );

        then(
                assertThat(the_status_code().value(), is(200)),
                and(
                        assertThat(the_returned_json().at("/application/status").asText(), is("WARNING"))),
                and(
                        assertThat(the_returned_json().at("/application/name").asText(), is("teststatus"))
                )
        );
    }

    @Test
    public void shouldGetApplicationStatusDetailsAsJson() throws IOException {
        when(
                the_internal_status_is_retrieved_as("application/json")
        );

        then(
                assertThat(the_status_code().value(), is(200)),
                and(
                        assertThat(the_returned_json().at("/application/statusDetails/foo/status").asText(), is("OK"))
                ),
                and(
                        assertThat(the_returned_json().at("/application/statusDetails/bar/status").asText(), is("WARNING"))
                )
        );
    }

    @Test
    public void shouldGetApplicationStatusWithVcsInformation() throws IOException {
        when(
                the_internal_status_is_retrieved_as("application/json")
        );

        then(
                assertThat(the_status_code().value(), is(200)),
                and(
                        assertThat(the_returned_json().at("/application/version").asText(), is("unknown"))
                ),
                and(
                        assertThat(the_returned_json().at("/application/commit").asText(), is("unknown"))
                )
        );
    }

    @Test
    public void shouldGetApplicationStatusAsHtml() throws IOException {
        when(
                the_internal_status_is_retrieved_as("text/html")
        );

        then(
                assertThat(the_status_code().value(), is(200)),
                and(
                    assertThat(the_returned_content(), startsWith("<!DOCTYPE html>"))
                )
        );
    }
}

{'fraction_non_alphanumeric': 0.11790050920485703, 'fraction_numerical': 0.004700352526439483, 'mean_word_length': 1.9316877152698049, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '4233909', 'n_tokens_mistral': 1380, 'n_tokens_neox': 1305, 'n_words': 181}