public static String bodyPartToString(Part msg) throws MessagingException, IOException {
        if (!(msg.getContent() instanceof String)) {
            throw new IllegalStateException("Part getContent should be a String (might be multipart and you've not "
                   + "drilled down to the terminal payload)?");
        }
        return (String) msg.getContent();
    }
@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/test/api/src/test/java/io/apiman/manager/api/notifications/email/SimpleMailNotificationServiceTest.java