*/
public void testUpdateQos() {
System.out.println("***MsgQosFactoryTest: testUpdateQos ...");
try {
Timestamp timestamp = new Timestamp();
String xml =
"<qos>\n" +
" <destination queryType='EXACT' forceQueuing='true'>\n" +
" Tim\n" +
" </destination>\n" +
" <destination queryType='EXACT'>\n" +
" Ben\n" +
" </destination>\n" +
/*
" <destination queryType='XPATH'>\n" +
" //[GROUP='Manager']\n" +
" </destination>\n" +
" <destination queryType='XPATH'>\n" +
" //ROLE/[@id='Developer']\n" +
" </destination>\n" +
*/
" <sender>\n" +
" Gesa\n" +
" </sender>\n" +
" <priority>7</priority>\n" +
" <expiration lifeTime='2400' remainingLife='12000'/>\n" +
" <rcvTimestamp nanos='" + timestamp.getTimestamp() + "'/>\n" + // if from persistent store
" <persistent/>\n" +
" <forceUpdate>false</forceUpdate>\n" +
" <route>\n" +
" <node id='bilbo' stratum='2' timestamp='9408630500' dirtyRead='true'/>\n" +
" <node id='frodo' stratum='1' timestamp='9408630538' dirtyRead='false'/>\n" +
" <node id='heron' stratum='0' timestamp='9408630564'/>\n" +
" </route>\n" +
" <topic readonly='true'/>\n" +
"</qos>\n";
UpdateQos qos = new UpdateQos(glob, xml);
assertEquals("", true, qos.isSubscribable());
assertEquals("", true, qos.isPtp());
assertEquals("", false, qos.isVolatile());
assertEquals("", true, qos.isPersistent());
assertEquals("", true, qos.isReadonly());
assertEquals("", "Gesa", qos.getSender().getLoginName());
assertEquals("", 3, qos.getRouteNodes().length);
assertEquals("", 2, qos.getRouteNodes()[0].getStratum());
assertEquals("", 0, qos.getRouteNodes()[2].getStratum());
assertEquals("", 9408630500L, qos.getRouteNodes()[0].getTimestamp().getTimestamp());
assertEquals("", true, qos.getRouteNodes()[0].getDirtyRead());
assertEquals("", false, qos.getRouteNodes()[1].getDirtyRead());
assertEquals("", false, qos.getRouteNodes()[2].getDirtyRead());
assertEquals("", PriorityEnum.HIGH_PRIORITY, qos.getPriority());
assertEquals("", timestamp.getTimestamp(), qos.getRcvTimestamp().getTimestamp());
}
catch (XmlBlasterException e) {
fail("testUpdateQos failed: " + e.toString());
}