### Question:
SingleWildcardNode extends BasicTreeNode { @Override public boolean hasInterestIn(char value, SearchContext context) { if (value == '?' || value == '#') { return context.has(ContextKey.LAST_CHARACTER); } if (context.has(ContextKey.LEVEL_REACHED)) { context.remove(ContextKey.LEVEL_REACHED); return false; } if (value == '/') { context.add(ContextKey.LEVEL_REACHED, Boolean.TRUE); return true; } return true; }  @Override char getNodeValue(); @Override boolean isWildcard(); @Override boolean hasInterestIn(char value, SearchContext context); static final char WILDCARD; }### Answer:
@Test public void disallowMultiLevelMatching() { SearchContext context = new MapSearchContext(); assertTrue(singleWildcardTreeNode.hasInterestIn('a', context)); assertTrue(singleWildcardTreeNode.hasInterestIn('b', context)); assertTrue(singleWildcardTreeNode.hasInterestIn('/', context)); assertFalse(singleWildcardTreeNode.hasInterestIn('c', context)); }
@Test public void disallowQuestionMarkMatching() { SearchContext context = new MapSearchContext(); assertFalse(singleWildcardTreeNode.hasInterestIn('?', context)); }
@Test public void disallowBookmarkMatching() { SearchContext context = new MapSearchContext(); assertFalse(singleWildcardTreeNode.hasInterestIn('#', context)); }