public Object toIdObject(String baseId) throws AmqpProtocolException {
        if (baseId == null) {
            return null;
        }

        try {
            if (hasAmqpUuidPrefix(baseId)) {
                String uuidString = strip(baseId, AMQP_UUID_PREFIX_LENGTH);
                return UUID.fromString(uuidString);
            } else if (hasAmqpUlongPrefix(baseId)) {
                String longString = strip(baseId, AMQP_ULONG_PREFIX_LENGTH);
                return UnsignedLong.valueOf(longString);
            } else if (hasAmqpStringPrefix(baseId)) {
                return strip(baseId, AMQP_STRING_PREFIX_LENGTH);
            } else if (hasAmqpBinaryPrefix(baseId)) {
                String hexString = strip(baseId, AMQP_BINARY_PREFIX_LENGTH);
                byte[] bytes = convertHexStringToBinary(hexString);
                return new Binary(bytes);
            } else {
                // We have a string without any type prefix, transmit it as-is.
                return baseId;
            }
        } catch (IllegalArgumentException e) {
            throw new AmqpProtocolException("Unable to convert ID value");
        }
    }
@Test
    public void testToIdObjectWithStringContainingStringEncodingPrefix() throws Exception {
        String suffix = "myStringSuffix";
        String stringId = AMQPMessageIdHelper.AMQP_STRING_PREFIX + suffix;

        Object idObject = messageIdHelper.toIdObject(stringId);
        assertNotNull("null object should not have been returned", idObject);
        assertEquals("expected id object was not returned", suffix, idObject);
    }