UuidMessageIdStrategy implements MessageIdStrategy { @Override public URI newMessageId(SoapMessage message) { return URI.create(PREFIX + UUID.randomUUID().toString()); }  @Override boolean isDuplicate(URI messageId); @Override URI newMessageId(SoapMessage message); static final String PREFIX; }
@Test public void testStrategy() { URI messageId1 = strategy.newMessageId(null); Assert.assertNotNull("Empty messageId", messageId1); URI messageId2 = strategy.newMessageId(null); Assert.assertNotNull("Empty messageId", messageId2); Assert.assertFalse("Equal messageIds", messageId1.equals(messageId2)); }