@Test
public void testGetNamespaceResolverFromBrokenXml_in_scope() throws Exception {

    final NamespaceResolver nsResolver = getNamespaceResolverFromBrokenXml("" +
            "<root xmlns:a='aaa' xmlns:b='bbb'>" +
            "<foo xmlns:b='bbb2' xmlns:c='ccc'>" +
            "<bar");
    assertEquals(nsResolver.getURIForPrefix("a", false), "aaa");
    assertEquals(nsResolver.getURIForPrefix("b", false), "bbb2");
    assertEquals(nsResolver.getURIForPrefix("c", false), "ccc");
}