// Publish 5 messages
// 5 for first sub
// 1 for second sub
BlasterConnection conn = null;
for ( int i = 0; i<5;i++) {
try {
conn = factory.getConnection();
String c = "<content>"+i+"</content>";
String k = "<key oid='"+i+"' contentMime='text/xml'><TestLocalProtocol-AGENT id='"+i+"' type='generic'/></key>";
log.info("Key: " +k);
conn.publish(new MsgUnit(k, c.getBytes(), null));
} catch(XmlBlasterException e) {
log.warning("XmlBlasterException: " + e.getMessage());
assertTrue("publish - XmlBlasterException: " + e.getMessage(), false);
}finally {
if ( conn != null) {
conn.close();
} // end of if ()
} // end of finally
}