* A simple test to make sure that the UUIDs created are somewhat unique -
* test to make sure we don't have duplicates in the first ten created.
*/
public void testUniqueness() {
Hashtable<URI, String> hash = new Hashtable<URI, String>();
DefaultMessageURIGenerator dmurig = new DefaultMessageURIGenerator();
Message msg1 = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
msg1.getBody().add("bar");
try {
msg1.getHeader().getCall().setTo(new HTTPEpr("http://foo.bar"));
msg1.getHeader().getCall().setMessageID(new URI("urn:1234"));
} catch (URISyntaxException e1) {
fail(e1.getMessage());
}
for (int i = 0 ; i < MAX_COUNT; i++) {
URI uuid = null;
try {
uuid = dmurig.generateMessageURI(msg1);
} catch (URIGenerationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (!hash.contains(uuid)) {