public static Object getMessageAnnotation(String key, Message message) {
        if (message != null && message.getMessageAnnotations() != null) {
            Map<Symbol, Object> annotations = message.getMessageAnnotations().getValue();
            return annotations.get(AmqpMessageSupport.getSymbol(key));
        }

        return null;
    }
@Test
    public void testGetMessageAnnotationWhenMessageHasEmptyAnnotationsMap() {
        Map<Symbol, Object> messageAnnotationsMap = new HashMap<Symbol,Object>();
        Message message = Proton.message();
        message.setMessageAnnotations(new MessageAnnotations(messageAnnotationsMap));

        assertNull(AmqpMessageSupport.getMessageAnnotation("x-opt-test", message));
    }