private Map<AMQPString, AMQPType> annotationMap() throws IOException { Map<AMQPString, AMQPType> annotations = new HashMap<AMQPString, AMQPType>(); // the spec allows keys to be symbol or ulong only, but the library only allows string annotations.put(new AMQPString("key1"), new AMQPString("value1")); annotations.put(new AMQPString("key2"), new AMQPString("value2")); return annotations; }
private void compareMaps(Map<AMQPString, AMQPType> m1, Map<AMQPType, AMQPType> m2){ Set e1 = m1.entrySet(); Set e2 = m2.entrySet(); assertTrue(e1.containsAll(e2)); assertTrue(e2.containsAll(e1)); }