<commit_before>package com.example.acceptance.steps;

import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import com.example.Application;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.ContextConfiguration;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
import static org.springframework.http.HttpStatus.OK;

@ContextConfiguration(classes = Application.class)
@SpringBootTest(webEnvironment = RANDOM_PORT)
public class HelloWorldSteps
{
    @Autowired
    private TestRestTemplate restTemplate;

    private ResponseEntity<String> response;

    @Given("^the application is running$")
    public void the_application_is_running() throws Throwable
    {
        // Write code here that turns the phrase above into concrete actions
    }

    @When("^i say hello to the application$")
    public void i_say_hello_to_the_application() throws Throwable
    {
        response = restTemplate.getForEntity("/", String.class);
    }

    @Then("^the application should say hello to me$")
    public void the_application_should_say_hello_to_me() throws Throwable
    {
        assertNotNull(response);
        assertEquals(OK, response.getStatusCode());
        assertEquals("Hello, World.", response.getBody());
    }
}<commit_msg>Renaming test methods to meet best practice.<commit_after>package com.example.acceptance.steps;

import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import com.example.Application;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.ContextConfiguration;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
import static org.springframework.http.HttpStatus.OK;

@ContextConfiguration(classes = Application.class)
@SpringBootTest(webEnvironment = RANDOM_PORT)
public class HelloWorldSteps
{
    @Autowired
    private TestRestTemplate restTemplate;

    private ResponseEntity<String> response;

    @Given("^the application is running$")
    public void givenTheApplicationIsRunning() throws Throwable
    {
        // Write code here that turns the phrase above into concrete actions
    }

    @When("^i say hello to the application$")
    public void whenISayHelloToTheApplication() throws Throwable
    {
        response = restTemplate.getForEntity("/", String.class);
    }

    @Then("^the application should say hello to me$")
    public void thenTheApplicationShouldSayHelloToMe() throws Throwable
    {
        assertNotNull(response);
        assertEquals(OK, response.getStatusCode());
        assertEquals("Hello, World.", response.getBody());
    }
}
{'fraction_non_alphanumeric': 0.09422034918723661, 'fraction_numerical': 0.0, 'mean_word_length': 4.809440559440559, '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': '3632572', 'n_tokens_mistral': 895, 'n_tokens_neox': 881, 'n_words': 202}