class XMPPNotification implements NotificationMethods {

    Message buildMessage (ChaosNotification notification) {
        Message msg = new Message();
        msg.setSubject(notification.getTitle());
        msg.setBody(notification.getMessage());
        XHTMLManager.addBody(msg, composeParagraph(notification.getTitle(), ParagraphStyle.NOTIFICATION_TITLE));
        XHTMLManager.addBody(msg, composeParagraph(MESSAGE_HEADER, ParagraphStyle.NOTIFICATION_MESSAGE_HEADER));
        XHTMLManager.addBody(msg,
                composeParagraph(notification.getMessage(), mapLevelToStyle(notification.getNotificationLevel())));
        XHTMLManager.addBody(msg, composeParagraph(INSTANCE_HEADER, ParagraphStyle.NOTIFICATION_FIELD_HEADER));
        XHTMLManager.addBody(msg, composeParagraph(HttpUtils.getMachineHostname(), ParagraphStyle.NOTIFICATION_FIELD));
        collectExperimentEventFields(notification.asMap(), msg);
        return msg;
    }

    @Autowired public  XMPPNotification();

}