@Test
public void testHeartbeat_connected() throws Exception {

	this.internalClient.openConnection();
	Assert.assertTrue( this.agent.getMessagingClient().isConnected());
	HeartbeatTask task = new HeartbeatTask( this.agent );
	Assert.assertEquals( 0, this.internalClient.messagesForTheDm.size());
	task.run();
	Assert.assertEquals( 1, this.internalClient.messagesForTheDm.size());
	Assert.assertEquals( MsgNotifHeartbeat.class, this.internalClient.messagesForTheDm.get( 0 ).getClass());
}