@Override
    public String getMessage() {
        if (!logPhi) {
            return super.getMessage();
        }

        String answer;
        if (hasHl7MessageBytes() || hasHl7AcknowledgementBytes()) {
            String parentMessage = super.getMessage();

            StringBuilder messageBuilder = new StringBuilder(
                    parentMessage.length()
                                                             + (hasHl7MessageBytes() ? hl7MessageBytes.length : 0)
                                                             + (hasHl7AcknowledgementBytes()
                                                                     ? hl7AcknowledgementBytes.length : 0));

            messageBuilder.append(parentMessage);

            if (hasHl7MessageBytes()) {
                messageBuilder.append("\n\t{hl7Message [")
                        .append(hl7MessageBytes.length)
                        .append("] = ");

                hl7Util.appendBytesAsPrintFriendlyString(messageBuilder, hl7MessageBytes, 0, hl7MessageBytes.length);

                messageBuilder.append('}');
            }

            if (hasHl7AcknowledgementBytes()) {
                messageBuilder.append("\n\t{hl7Acknowledgement [")
                        .append(hl7AcknowledgementBytes.length)
                        .append("] = ");

                hl7Util.appendBytesAsPrintFriendlyString(messageBuilder, hl7AcknowledgementBytes, 0,
                        hl7AcknowledgementBytes.length);

                messageBuilder.append('}');
            }

            answer = messageBuilder.toString();
        } else {
            answer = super.getMessage();
        }

        return answer;
    }
@Test
    public void testEmptyAcknowledgement() {
        instance = new MllpException(EXCEPTION_MESSAGE, HL7_MESSAGE_BYTES, EMPTY_BYTE_ARRAY, LOG_PHI_TRUE);

        assertEquals(expectedMessage(HL7_MESSAGE, null), instance.getMessage());
    }