<commit_before>package org.smoothbuild.util;

import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.empty;
import static org.testory.Testory.given;
import static org.testory.Testory.then;
import static org.testory.Testory.thenReturned;
import static org.testory.Testory.when;

import org.junit.Test;

public class DuplicatesDetectorTest {
  String string1 = "string1";
  String string2 = "string2";
  String string3 = "string3";
  String string4 = "string4";

  DuplicatesDetector<String> duplicatesDetector;

  @Test
  public void initially_has_no_duplicates() throws Exception {
    given(duplicatesDetector = new DuplicatesDetector<String>());
    then(!duplicatesDetector.hasDuplicates());
  }

  @Test
  public void adding_first_element_returns_false() throws Exception {
    given(duplicatesDetector = new DuplicatesDetector<String>());
    when(duplicatesDetector).add(string1);
    thenReturned(false);
  }

  @Test
  public void has_no_duplicates_after_adding_first_element() throws Exception {<commit_msg>style cleanup in DuplicatesDetectorTest<commit_after>package org.smoothbuild.util;

import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.empty;
import static org.testory.Testory.given;
import static org.testory.Testory.then;
import static org.testory.Testory.thenReturned;
import static org.testory.Testory.when;

import org.junit.Test;

public class DuplicatesDetectorTest {
  String string1 = "string1";
  String string2 = "string2";
  String string3 = "string3";
  String string4 = "string4";

  DuplicatesDetector<String> duplicatesDetector;

  @Test
  public void initially_has_no_duplicates() throws Exception {
    when(duplicatesDetector = new DuplicatesDetector<String>());
    then(!duplicatesDetector.hasDuplicates());
  }

  @Test
  public void adding_first_element_returns_false() throws Exception {
    given(duplicatesDetector = new DuplicatesDetector<String>());
    when(duplicatesDetector).add(string1);
    thenReturned(false);
  }

  @Test
  public void has_no_duplicates_after_adding_first_element() throws Exception {
{'fraction_non_alphanumeric': 0.09291412482402628, 'fraction_numerical': 0.008446738620366025, 'mean_word_length': 5.833333333333333, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3312416', 'n_tokens_mistral': 683, 'n_tokens_neox': 666, 'n_words': 135}