<commit_before>defmodule UnshorteningPool.Cache.Test do
  use ExUnit.Case
  alias UnshorteningPool.Cache

  test "It should not hit when empty" do
    assert false == Cache.check("http:///not-found.example.com")
  end

  test "It should hit after loading a value" do
    Cache.add("http:///www.example.com", "http://a-long-url.example.com")
    assert "http://a-long-url.example.com" == Cache.check("http:///www.example.com")
  end

  test "It should be able to change a value" do
    Cache.add("http:///www.example.com", "http://a-long-url.example.com")
    Cache.add("http:///www.example.com", "http://a-different-url.example.com")

    assert "http://a-different-url.example.com" == Cache.check("http:///www.example.com")
  end

  test "it shold register itself with the name UnshorteningPool.Cache" do
    Cache.add("http:///www.example.com", "http://a-long-url.example.com")
    assert "http://a-long-url.example.com" == Cache.check("http:///www.example.com")
  end
end<commit_msg>Remove now redundant test<commit_after>defmodule UnshorteningPool.Cache.Test do
  use ExUnit.Case
  alias UnshorteningPool.Cache

  test "It should not hit when empty" do
    assert false == Cache.check("http:///not-found.example.com")
  end

  test "It should hit after loading a value" do
    Cache.add("http:///www.example.com", "http://a-long-url.example.com")
    assert "http://a-long-url.example.com" == Cache.check("http:///www.example.com")
  end

  test "It should be able to change a value" do
    Cache.add("http:///www.example.com", "http://a-long-url.example.com")
    Cache.add("http:///www.example.com", "http://a-different-url.example.com")

    assert "http://a-different-url.example.com" == Cache.check("http:///www.example.com")
  end
end
{'fraction_non_alphanumeric': 0.18004587155963303, 'fraction_numerical': 0.0, 'mean_word_length': 3.3734335839599, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 12, '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': '6200643', 'n_tokens_mistral': 598, 'n_tokens_neox': 582, 'n_words': 124}