<commit_before>package de.retest.recheck.util;

import static org.assertj.core.api.Assertions.assertThat;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

public class DeleteOnCloseFileInputStreamTest {

	@Rule
	public TemporaryFolder tempFolder = new TemporaryFolder();

	@Test
	public void file_should_be_deleted_on_close() throws IOException {
		final File file = tempFolder.newFile();
		final InputStream in = new DeleteOnCloseFileInputStream( file );

		in.close();

		assertThat( file ).doesNotExist();
	}

}<commit_msg>Migrate to JUnit 5<commit_after>package de.retest.recheck.util;

import static org.assertj.core.api.Assertions.assertThat;

import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

class DeleteOnCloseFileInputStreamTest {

	@Test
	void file_should_be_deleted_on_close( @TempDir final Path temp ) throws IOException {
		final Path file = temp.resolve( "foo" );
		Files.createFile( file );
		final InputStream in = new DeleteOnCloseFileInputStream( file.toFile() );

		in.close();

		assertThat( file ).doesNotExist();
	}

}
{'fraction_non_alphanumeric': 0.1056283731688512, 'fraction_numerical': 0.0007710100231303007, 'mean_word_length': 5.180952380952381, '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': '7061703', 'n_tokens_mistral': 431, 'n_tokens_neox': 414, 'n_words': 94}