### Question:
AmqpMessageIdHelper { public static String toCorrelationIdString(Object idObject) { if (idObject instanceof String) { final String stringId = (String) idObject; boolean hasMessageIdPrefix = hasMessageIdPrefix(stringId); if (!hasMessageIdPrefix) { return stringId; } else if (hasTypeEncodingPrefix(stringId, JMS_ID_PREFIX_LENGTH)) { return JMS_ID_PREFIX + AMQP_STRING_PREFIX + stringId; } else { return stringId; } } else { return convertToIdString(idObject); } }  static boolean hasMessageIdPrefix(String string); static String toMessageIdString(Object idObject); static String toCorrelationIdString(Object idObject); static Object toIdObject(final String origId); static byte[] convertHexStringToBinary(String hexString); static String convertBinaryToHexString(byte[] bytes); static final String AMQP_STRING_PREFIX; static final String AMQP_UUID_PREFIX; static final String AMQP_ULONG_PREFIX; static final String AMQP_BINARY_PREFIX; static final String AMQP_NO_PREFIX; static final String JMS_ID_PREFIX; }### Answer:
@Test public void testToCorrelationIdStringWithNull() { assertNull("null string should have been returned", AmqpMessageIdHelper.toCorrelationIdString(null)); }
@Test public void testToCorrelationIdStringThrowsIAEWithUnexpectedType() { try { AmqpMessageIdHelper.toCorrelationIdString(new Object()); fail("expected exception not thrown"); } catch (IllegalArgumentException iae) { } }