// Path: src/main/java/io/aif/language/common/ISearchable.java
// public interface ISearchable<T, R> {
// 
//   public Optional<R> search(final T subject);
// 
// }
// 
// Path: src/main/java/io/aif/language/word/IWord.java
// public interface IWord {
// 
//   public String getRootToken();
// 
//   public Set<String> getAllTokens();
// 
//   public Long getCount();
// 
//   public int getTokenCount(String token);
// 
//   public static interface IWordPlaceholder {
// 
//     public IWord getWord();
// 
//     public String getToken();
// 
//   }
// 
// }


import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import io.aif.language.common.IDict;
import io.aif.language.common.ISearchable;
import io.aif.language.word.IWord;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
        .entrySet()
        .stream()
        .map(pair -> new Word(
                pair.getKey(),
                new HashSet<String>(pair.getValue()), (long) pair.getValue().size()
            )
        ).collect(Collectors.toSet());

    IDict dict = Dict.create(words);
    assertEquals(dict.getWords(), words);
  }

  @Test(groups = "unit-tests", enabled = false)
  public void testSearch() throws Exception {
    IWord expectedIWord = new Word("see", fixture.remove("see"), 0l);
    Set<IWord> words = fixture
        .entrySet()
        .stream()
        .map(pair -> new Word(
                pair.getKey(),
                new HashSet<String>(pair.getValue()), (long) pair.getValue().size()
            )
        ).collect(Collectors.toSet());
    words.add(expectedIWord);

    ISearchable dict = Dict.create(words);
    Optional actual = dict.search("foreseen");
    assertEquals(actual.get(), expectedIWord);
  }

// Path: src/main/java/io/aif/language/common/ISearchable.java
// public interface ISearchable<T, R> {
// 
//   public Optional<R> search(final T subject);
// 
// }
// 
// Path: src/main/java/io/aif/language/word/IWord.java
// public interface IWord {
// 
//   public String getRootToken();
// 
//   public Set<String> getAllTokens();
// 
//   public Long getCount();
// 
//   public int getTokenCount(String token);
// 
//   public static interface IWordPlaceholder {
// 
//     public IWord getWord();
// 
//     public String getToken();
// 
//   }
// 
// }


// Path: src/test/unit/java/io/aif/language/word/dict/DictTest.java
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import io.aif.language.common.IDict;
import io.aif.language.common.ISearchable;
import io.aif.language.word.IWord;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;

        .entrySet()
        .stream()
        .map(pair -> new Word(
                pair.getKey(),
                new HashSet<String>(pair.getValue()), (long) pair.getValue().size()
            )
        ).collect(Collectors.toSet());

    IDict dict = Dict.create(words);
    assertEquals(dict.getWords(), words);
  }

  @Test(groups = "unit-tests", enabled = false)
  public void testSearch() throws Exception {
    IWord expectedIWord = new Word("see", fixture.remove("see"), 0l);
    Set<IWord> words = fixture
        .entrySet()
        .stream()
        .map(pair -> new Word(
                pair.getKey(),
                new HashSet<String>(pair.getValue()), (long) pair.getValue().size()
            )
        ).collect(Collectors.toSet());
    words.add(expectedIWord);

    ISearchable dict = Dict.create(words);
    Optional actual = dict.search("foreseen");
    assertEquals(actual.get(), expectedIWord);
  }

  @Test(groups = "unit-tests", enabled = false)