<commit_before>package org.graphwalker.java.source.cache;

import org.junit.Before;
import org.junit.Test;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;

import static org.junit.Assert.*;

public class SimpleCacheTest {

  @Test
  public void get() throws IOException {
    SimpleCache cache = new SimpleCache(Paths.get("./"));
    // create temporary file
    File foo = File.createTempFile("prefix", "suffix");
    foo.deleteOnExit();
    Path key = foo.toPath();
    long lastModified = foo.lastModified();
    cache.add(key, new CacheEntry(lastModified, true));
    CacheEntry cached = cache.get(key);
    assertEquals(lastModified, cached.getLastModifiedTime().toMillis());
    assertEquals(true, cached.isGenerated());

    assertTrue(cache.contains(key));
  }
}
<commit_msg>Clean up after test<commit_after>package org.graphwalker.java.source.cache;

import org.junit.Before;
import org.junit.Test;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;

import static org.junit.Assert.*;

public class SimpleCacheTest {

  @Test
  public void get() throws IOException {
    SimpleCache cache = new SimpleCache(Paths.get("./"));
    // create temporary file
    File foo = File.createTempFile("prefix", "suffix");
    foo.deleteOnExit();
    Path key = foo.toPath();
    long lastModified = foo.lastModified();
    cache.add(key, new CacheEntry(lastModified, true));
    CacheEntry cached = cache.get(key);
    assertEquals(lastModified, cached.getLastModifiedTime().toMillis());
    assertEquals(true, cached.isGenerated());

    assertTrue(cache.contains(key));
    
      // Clean up after test
      assertTrue( new File("./cache.json").delete() );
  }
}

{'fraction_non_alphanumeric': 0.13577464788732393, 'fraction_numerical': 0.0, 'mean_word_length': 4.045454545454546, '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': '5940018', 'n_tokens_mistral': 526, 'n_tokens_neox': 522, 'n_words': 122}