# File test/test_wpm_xml_with_xmlparser.rb, line 15
    def test_ns
      # nest level 1
      @ns_map.start_element
      @ns_map.add_ns('', 'http://www.w3.org/1999/xhtml')
      @ns_map.add_ns('x', 'test://foo')
      @ns_map.add_ns('y', 'test://bar')

      assert_equal('http://www.w3.org/1999/xhtml', @ns_map[''])
      assert_equal('test://foo', @ns_map['x'])
      assert_equal('test://bar', @ns_map['y'])
      assert_nil(@ns_map['z'])

      # nest level 2
      @ns_map.start_element
      @ns_map.add_ns('', 'test://foo')
      @ns_map.add_ns('x', 'http://www.w3.org/1999/xhtml')
      @ns_map.add_ns('y', 'test://foo')
      @ns_map.add_ns('z', 'test://bar')

      assert_equal('test://foo', @ns_map[''])
      assert_equal('http://www.w3.org/1999/xhtml', @ns_map['x'])
      assert_equal('test://foo', @ns_map['y'])
      assert_equal('test://bar', @ns_map['z'])

      # end of nest level 2
      @ns_map.end_element

      assert_equal('http://www.w3.org/1999/xhtml', @ns_map[''])
      assert_equal('test://foo', @ns_map['x'])
      assert_equal('test://bar', @ns_map['y'])
      assert_nil(@ns_map['z'])

      # end of nest level1
      @ns_map.end_element
    end