// publish non-retained message
connection.publish(TOPIC, TOPIC.getBytes(), QoS.EXACTLY_ONCE, false);
Message msg = connection.receive(1000, TimeUnit.MILLISECONDS);
assertNotNull(msg);
assertEquals(TOPIC, new String(msg.getPayload()));
msg.ack();
assertEquals(1, publishMap.size());
final short id = (short) (i + 1);
assertNotNull("No message for id " + id, publishMap.get(id));
publishMap.clear();