<commit_before>package hudson.plugins.git.extensions.impl;

import hudson.EnvVars;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Result;
import hudson.plugins.git.TestGitRepo;
import hudson.plugins.git.extensions.GitSCMExtension;
import hudson.plugins.git.extensions.GitSCMExtensionTest;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.jenkinsci.plugins.gitclient.Git;
import org.jenkinsci.plugins.gitclient.GitClient;
import org.junit.Test;
import org.jvnet.hudson.test.WithoutJenkins;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

public class WipeWorkspaceTest extends GitSCMExtensionTest {

    TestGitRepo repo;
    GitClient git;

    @Override
    public void before() throws Exception {
        repo = new TestGitRepo("repo", tmp.newFolder(), listener);
        git = Git.with(listener, new EnvVars()).in(repo.gitDir).getClient();
    }

    @Override
    protected GitSCMExtension getExtension() {
        return new WipeWorkspace();
    }

    /**
     * Test to confirm the behavior of forcing re-clone before checkout by cleaning the workspace first.
     **/
    @Test
    public void testWipeWorkspace() throws Exception {
        FreeStyleProject projectWithMaster = setupBasicProject(repo);
        git.commit("First commit");
        FreeStyleBuild build = build(projectWithMaster, Result.SUCCESS);

        String buildLog = build.getLog();
        assertThat("Workspace not cleaned before checkout",true, is(buildLog.contains("Wiping out workspace first.")));
    }

    @Test
    @WithoutJenkins
    public void equalsContract() {
        EqualsVerifier.forClass(WipeWorkspace.class)
                .usingGetClass()
                .verify();
    }
}<commit_msg>A small change in before() method to run equalsContract() test<commit_after>package hudson.plugins.git.extensions.impl;

import hudson.EnvVars;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Result;
import hudson.plugins.git.TestGitRepo;
import hudson.plugins.git.extensions.GitSCMExtension;
import hudson.plugins.git.extensions.GitSCMExtensionTest;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.jenkinsci.plugins.gitclient.Git;
import org.jenkinsci.plugins.gitclient.GitClient;
import org.junit.Test;
import org.jvnet.hudson.test.WithoutJenkins;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

public class WipeWorkspaceTest extends GitSCMExtensionTest {

    TestGitRepo repo;
    GitClient git;

    @Override
    public void before() throws Exception {
        // do nothing
    }

    @Override
    protected GitSCMExtension getExtension() {
        return new WipeWorkspace();
    }

    /**
     * Test to confirm the behavior of forcing re-clone before checkout by cleaning the workspace first.
     **/
    @Test
    public void testWipeWorkspace() throws Exception {
        repo = new TestGitRepo("repo", tmp.newFolder(), listener);
        git = Git.with(listener, new EnvVars()).in(repo.gitDir).getClient();

        FreeStyleProject projectWithMaster = setupBasicProject(repo);
        git.commit("First commit");
        FreeStyleBuild build = build(projectWithMaster, Result.SUCCESS);

        String buildLog = build.getLog();
        assertThat("Workspace not cleaned before checkout",true, is(buildLog.contains("Wiping out workspace first.")));
    }

    @Test
    @WithoutJenkins
    public void equalsContract() {
        EqualsVerifier.forClass(WipeWorkspace.class)
                .usingGetClass()
                .verify();
    }
}
{'fraction_non_alphanumeric': 0.09643835616438357, 'fraction_numerical': 0.0, 'mean_word_length': 3.6568877551020407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4556948', 'n_tokens_mistral': 1081, 'n_tokens_neox': 1038, 'n_words': 237}