public void appendBytesAsPrintFriendlyString(StringBuilder builder, byte[] phiBytes) {
        appendBytesAsPrintFriendlyString(builder, phiBytes, 0, phiBytes != null ? phiBytes.length : 0);
    }
@Test
    public void testAppendBytesAsPrintFriendlyString() {
        StringBuilder builder = null;

        try {
            hl7util.appendBytesAsPrintFriendlyString(builder, null);
            fail("Exception should be raised with null StringBuilder argument");
        } catch (IllegalArgumentException ignoredEx) {
            // Eat this
        }

        builder = new StringBuilder();
        hl7util.appendBytesAsPrintFriendlyString(builder, (byte[]) null);
        assertEquals(hl7util.NULL_REPLACEMENT_VALUE, builder.toString());

        builder = new StringBuilder();
        hl7util.appendBytesAsPrintFriendlyString(builder, new byte[0]);
        assertEquals(hl7util.EMPTY_REPLACEMENT_VALUE, builder.toString());

        builder = new StringBuilder();
        hl7util.appendBytesAsPrintFriendlyString(builder, TEST_MESSAGE_BYTES);
        assertEquals(EXPECTED_MESSAGE, builder.toString());
    }