### Question:
CompositeTagRegistry extends AbstractTagRegistry { public TagHandler getHandlerFor(NSName name) { TagHandler handler; for (TagRegistry registry : registries) { handler = registry.getHandlerFor(name); if (handler != null) { return handler; } } return null; } CompositeTagRegistry(Collection<? extends TagRegistry> registries); TagHandler getHandlerFor(NSName name);  }### Answer:
@Test public void firstRegistryWins() { TagRegistry.NSName foo = new TagRegistry.NSName(TEST_NAMESPACE, "foo"); assertSame(fooTag, registry.getHandlerFor(foo)); }
@Test public void secondRegistryUsed() { TagRegistry.NSName bar = new TagRegistry.NSName(TEST_NAMESPACE, "bar"); assertSame(barTag, registry.getHandlerFor(bar)); }
@Test public void unknownNamesReturnNull() { TagRegistry.NSName baz = new TagRegistry.NSName(TEST_NAMESPACE, "baz"); assertNull(registry.getHandlerFor(baz)); }