@Test
public void testGetElement() throws Exception {

    // Creating SOAP envelope
    SOAPEnvelope env = SOAPEnv.createEnvelope(SOAPEnv.SOAPVersion.SOAP_12);
    // Adding header
    SOAPHeaderBlock soapHeaderBlock = Messaging.createElement(env);
    SOAPHeaderBlock newSoapHeaderBlock = Messaging.getElement(env);
    assertEquals(soapHeaderBlock.getMustUnderstand(),
            newSoapHeaderBlock.getMustUnderstand());
    assertEquals(soapHeaderBlock.getRelay(), newSoapHeaderBlock.getRelay());
    assertEquals(soapHeaderBlock.getRole(), newSoapHeaderBlock.getRole());
    assertEquals(soapHeaderBlock.getVersion(),
            newSoapHeaderBlock.getVersion());
}