### Question:
DefaultTagRegistry extends AbstractTagRegistry { public TagHandler getHandlerFor(NSName name) { return handlers.get(name); } @Inject  DefaultTagRegistry(Set<TagHandler> handlers); TagHandler getHandlerFor(NSName name);  }### Answer:
@Test public void getHandlerForWithElement() { Element el = XmlUtil.parseSilent("<Tag xmlns='#test'/>"); assertSame(tag, registry.getHandlerFor(el)); }
@Test public void getHandlerForUsesNamespace() { Element el = XmlUtil.parseSilent("<Tag xmlns='#nottest'/>"); assertNull(registry.getHandlerFor(el)); }
@Test public void getHandlerIsCaseSensitive() { Element el = XmlUtil.parseSilent("<tag xmlns='#test'/>"); assertNull(registry.getHandlerFor(el)); }
@Test public void getHandlerForWithNSName() { TagRegistry.NSName nsName = new TagRegistry.NSName(TEST_NAMESPACE, TEST_NAME); assertSame(tag, registry.getHandlerFor(nsName)); }