<commit_before>package com.justindb

import org.scalatest._
import com.justindb.Ring

class RingTest extends FlatSpec with Matchers {

  "Ring" should "be empty after initialization" in {
    val ring = new Ring

    ring.underlying should have size 0
  }

}<commit_msg>test that Ring allow adding new Nodes to it<commit_after>package com.justindb

import org.scalatest._
import com.justindb.{Ring, Node, Hash}

class RingTest extends FlatSpec with Matchers {

  "Ring" should "be empty after initialization" in {
    val ring = new Ring

    ring.underlying should have size 0
  }

  it should "allow to save Node with combined Hash" in {
    var ring = new Ring

    val node = Node(Key(value = "random-key"), underlyingActor = null)
    val nodeHash = Hash(500)
    ring = Ring(ring.underlying + ((nodeHash -> node)))

    ring.underlying should have size 1
  }

}
{'fraction_non_alphanumeric': 0.08189158016147635, 'fraction_numerical': 0.006920415224913495, 'mean_word_length': 3.4742268041237114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5096849', 'n_tokens_mistral': 279, 'n_tokens_neox': 259, 'n_words': 98}