### Question:
AmqpMessageSupport { public static Object getMessageAnnotation(Symbol key, MessageAnnotations messageAnnotations) { if (messageAnnotations != null && messageAnnotations.getValue() != null) { Map<Symbol, Object> annotations = messageAnnotations.getValue(); return annotations.get(key); } return null; }  static Object getMessageAnnotation(Symbol key, MessageAnnotations messageAnnotations); static boolean isContentType(Symbol contentType, Symbol messageContentType); static Message decodeMessage(ByteBuf encodedBytes); static ReadableBuffer encodeMessage(Message message); static final Symbol JMS_MSG_TYPE; static final Symbol JMS_DELIVERY_TIME; static final byte JMS_MESSAGE; static final byte JMS_OBJECT_MESSAGE; static final byte JMS_MAP_MESSAGE; static final byte JMS_BYTES_MESSAGE; static final byte JMS_STREAM_MESSAGE; static final byte JMS_TEXT_MESSAGE; static final String JMS_AMQP_TTL; static final String JMS_AMQP_REPLY_TO_GROUP_ID; static final String JMS_AMQP_TYPED_ENCODING; static final Symbol SERIALIZED_JAVA_OBJECT_CONTENT_TYPE; static final Symbol OCTET_STREAM_CONTENT_TYPE; static final Symbol LEGACY_TO_TYPE_MSG_ANNOTATION_SYMBOL; static final Symbol LEGACY_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL; static final String LEGACY_QUEUE_ATTRIBUTE; static final String LEGACY_TOPIC_ATTRIBUTE; static final String LEGACY_TEMPORARY_ATTRIBUTE; }### Answer:
@Test public void testGetMessageAnnotationWhenMessageHasAnnotationsMap() { Map<Symbol, Object> messageAnnotationsMap = new HashMap<Symbol,Object>(); messageAnnotationsMap.put(TEST_SYMBOL, Boolean.TRUE); assertNotNull(AmqpMessageSupport.getMessageAnnotation(TEST_SYMBOL, new MessageAnnotations(messageAnnotationsMap))); }
@Test public void testGetMessageAnnotationWhenMessageHasEmptyAnnotationsMap() { Map<Symbol, Object> messageAnnotationsMap = new HashMap<Symbol,Object>(); assertNull(AmqpMessageSupport.getMessageAnnotation(TEST_SYMBOL, new MessageAnnotations(messageAnnotationsMap))); }
@Test public void testGetMessageAnnotationWhenMessageAnnotationHasNoAnnotationsMap() { assertNull(AmqpMessageSupport.getMessageAnnotation(TEST_SYMBOL, new MessageAnnotations(null))); }
@Test public void testGetMessageAnnotationWhenMessageIsNull() { assertNull(AmqpMessageSupport.getMessageAnnotation(TEST_SYMBOL, null)); }