PropertyElement { public static Iterator<OMElement> getElements(final OMElement parent) { return parent.getChildrenWithName(Q_ELEMENT_NAME); }  static OMElement createElement(final OMElement parent, final IProperty data); static Iterator<OMElement> getElements(final OMElement parent); static Property readElement(final OMElement propElement); static final QName Q_ELEMENT_NAME; static final String LN_ATTR_NAME; static final String LN_ATTR_TYPE; }
@Test public void testGetElements() throws Exception { Iterator<OMElement> propElements = PropertyElement.getElements(createXML( "<parent>" + " <eb3:Property name=\"original-file-name\"" + " xmlns:eb3=\"http: "simple_document.xml</eb3:Property>" + "</parent>")); assertNotNull(propElements); OMElement propElement = propElements.next(); assertEquals(Q_ELEMENT_NAME, propElement.getQName()); assertFalse(propElements.hasNext()); propElements = PropertyElement.getElements(createXML( "<parent" + " xmlns:eb3=\"http: " <eb3:Property name=\"original-file-name\">simple_document.xml</eb3:Property>" + " <eb3:Property name=\"reference_number\">XREF_4828</eb3:Property>" + "</parent>")); assertNotNull(propElements); propElement = propElements.next(); assertEquals(Q_ELEMENT_NAME, propElement.getQName()); assertTrue(propElements.hasNext()); propElement = propElements.next(); assertEquals(Q_ELEMENT_NAME, propElement.getQName()); assertFalse(propElements.hasNext()); }