1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.ws.soap.addressing.messageid;
18
19 import java.net.URI;
20
21 import junit.framework.TestCase;
22
23 public class RandomGuidMessageIdStrategyTest extends TestCase {
24
25 private MessageIdStrategy strategy;
26
27 protected final void setUp() throws Exception {
28 strategy = new RandomGuidMessageIdStrategy();
29 }
30
31 public void testStrategy() {
32 URI messageId1 = strategy.newMessageId(null);
33 assertNotNull("Empty messageId", messageId1);
34 URI messageId2 = strategy.newMessageId(null);
35 assertNotNull("Empty messageId", messageId2);
36 assertFalse("Equal messageIds", messageId1.equals(messageId2));
37 }
38 }