// please stop CAT server when you run this test case
Assert.assertEquals("One message should be in the queue.", 1, m_queue.size());
MessageTree tree = m_queue.poll();
Message m = tree.getMessage();
Assert.assertTrue(Transaction.class.isAssignableFrom(m.getClass()));
Transaction trans = (Transaction) m;
Assert.assertEquals("URL", trans.getType());
Assert.assertEquals("MyPage", trans.getName());
Assert.assertEquals("0", trans.getStatus());
Assert.assertTrue(trans.getDurationInMillis() > 0);
Assert.assertEquals("k1=v1&k2=v2&k3=v3", trans.getData().toString());
Assert.assertEquals(1, trans.getChildren().size());
Message c = trans.getChildren().get(0);
Assert.assertEquals("URL", c.getType());
Assert.assertEquals("Payload", c.getName());
Assert.assertEquals("0", c.getStatus());
Assert.assertEquals("host=my-host&ip=127.0.0.1&agent=...", c.getData().toString());
}