<commit_before>import Score.Highscore;
import Score.Score;
import org.junit.jupiter.api.Test;

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

class HighscoreTest {

	@Test
	void testBest(){
		Highscore hs = new Highscore("test/res/testdata.dat");
		Score best = hs.getTop(1)[0];
		assertEquals(best.getUsername(), "Feizi");
	}

	@Test
	void testAddingScore(){
		Highscore hs = new Highscore("test/res/testdata.dat");
		hs.addScore("Someone", 20);
		System.out.print(hs.toString());
		assertEquals(hs.toString().contains("Someone"), true);
	}



}<commit_msg>Added test for saving highscore<commit_after>import Score.Highscore;
import Score.Score;
import org.junit.jupiter.api.Test;

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

class HighscoreTest {

	@Test
	void testBest(){
		Highscore hs = new Highscore("test/res/testdata.dat");
		Score best = hs.getTop(1)[0];
		assertEquals(best.getUsername(), "Feizi");
	}

	@Test
	void testAddingScore(){
		Highscore hs = new Highscore("test/res/testdata.dat");
		hs.addScore("Someone", 20);
		System.out.print(hs.toString());
		assertEquals(hs.toString().contains("Someone"), true);
	}

	@Test
	void savingAndLoading(){
		Highscore hs = new Highscore("test/res/testdata.dat");
		String before = hs.toString();
		hs.save();
		hs = new Highscore("test/res/testdata.dat");
		assertEquals(before, hs.toString());
	}

}
{'fraction_non_alphanumeric': 0.15922190201729106, 'fraction_numerical': 0.005763688760806916, 'mean_word_length': 4.987068965517241, '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': '887038', 'n_tokens_mistral': 506, 'n_tokens_neox': 459, 'n_words': 90}