SOAPHeaderHandler implements SOAPHandler<SOAPMessageContext> { protected String generateMessageId() { return AddressingHeaderCreator.generateMessageId(); }  @Override Set<QName> getHeaders(); @Override boolean handleMessage(SOAPMessageContext messageContext); @Override boolean handleFault(SOAPMessageContext messageContext); @Override void close(MessageContext context);  }
@Test public void testGenerateMessageId() { SOAPHeaderHandler headerHandler = new SOAPHeaderHandler(); String generatedId = headerHandler.generateMessageId(); assertTrue(generatedId.trim().startsWith("urn:uuid:")); }