@Test
public void testCreateEnvelope() throws Exception {

    SOAPEnvelope env =
            SOAPEnv.createEnvelope(SOAPEnv.SOAPVersion.SOAP_12);
    Iterator<OMNamespace> it = env.getNamespacesInScope();
    HashSet<String> prefixSet = new HashSet<>();
    while (it.hasNext()) {
        OMNamespace omNamespace = it.next();
        String prefix = omNamespace.getPrefix();
        prefixSet.add(prefix);
        String uri = omNamespace.getNamespaceURI();
        if (prefix.equals("soapenv")) {
            assertTrue(uri.equals("http://www.w3.org/2003/05/soap-envelope"));
        } else if (prefix.equals(EbMSConstants.EBMS3_NS_PREFIX)) {
            assertTrue(uri.equals(EbMSConstants.EBMS3_NS_URI));
        } else if (prefix.equals("xsd")) {
            assertTrue(uri.equals("http://www.w3.org/1999/XMLSchema"));
        } else if (prefix.equals("xsi")) {
            assertTrue(uri.equals("http://www.w3.org/1999/XMLSchema-instance/"));
        }
    }
    assertTrue(prefixSet.contains("soapenv"));
    assertTrue(prefixSet.contains(EbMSConstants.EBMS3_NS_PREFIX));
    assertTrue(prefixSet.contains("xsd"));
    assertTrue(prefixSet.contains("xsi"));
}