@Test
public void testTreeInsertsProperlySearch() throws Exception {

    TrieNode trie = new TrieNode();
    trie.insert("search");
    trie.insert("searches");
    trie.insert("searched");
    trie.insert("searching");
    assertEquals(1, trie.edges.size());
    assertEquals("search", trie.edges.get(0).label);
    assertEquals(2, trie.edges.get(0).targetEdgesSize());
    assertEquals("e", trie.edges.get(0).targetEdge(0).label);
    assertEquals(2, trie.edges.get(0).targetEdge(0).targetEdgesSize());
    assertEquals("d", trie.edges.get(0).targetEdge(0).targetEdge(0).label);
    assertEquals("s", trie.edges.get(0).targetEdge(0).targetEdge(1).label);
    assertEquals("ing", trie.edges.get(0).targetEdge(1).label);
}