### Question:
PrefixTree { public boolean containsString(@Nonnull String s) { return root.containsString(s, 0); } PrefixTree(); void addString(@Nonnull String s); boolean containsString(@Nonnull String s); @Nonnull PrefixTreeNode getRoot();  }### Answer:
@Test public void testShouldFindStrings() throws Exception { final PrefixTree tree = createTestTree(); assertFalse(tree.containsString("t")); assertFalse(tree.containsString("te")); assertTrue(tree.containsString("ted")); assertTrue(tree.containsString("ten")); assertTrue(tree.containsString("tea")); assertFalse(tree.containsString("teak")); assertTrue(tree.containsString("to")); }