PullRequestElement { public static OMElement getElement(final SOAPHeaderBlock messaging) { final Iterator<?> signals = SignalMessageElement.getElements(messaging); OMElement pullReq = null; while((pullReq == null) && signals.hasNext()) pullReq = ((OMElement) signals.next()).getFirstChildWithName(Q_ELEMENT_NAME); return pullReq; }  static org.holodeckb2b.common.messagemodel.PullRequest readElement(final OMElement prElement); static OMElement getElement(final SOAPHeaderBlock messaging); static OMElement createElement(final OMElement messaging, final IPullRequest pullRequest); static final QName Q_ELEMENT_NAME; }
@Test public void testGetElement() throws Exception { PullRequest pullRequest = new PullRequest(); pullRequest.setMPC("some_mpc"); PullRequestElement.createElement(headerBlock, pullRequest); OMElement prElement = PullRequestElement.getElement(headerBlock); assertEquals(PULLREQUEST_ELEMENT_NAME, prElement.getQName()); assertEquals("some_mpc", prElement.getAttributeValue(new QName("mpc"))); }