@Test
	public void testBadDecode() throws Exception {
		EmbeddedHeadersMessageConverter converter = new EmbeddedHeadersMessageConverter();
		byte[] bytes = "\u0002\u0003foo\u0020bar\u0003baz\u0004quxxHello".getBytes("UTF-8");
		Message<byte[]> message = new GenericMessage<byte[]>(bytes);
		try {
			converter.extractHeaders(message,false);
			Assert.fail("Exception expected");
		}
		catch (Exception e) {
			String s = EmbeddedHeadersMessageConverter.decodeExceptionMessage(message);
			assertThat(e, instanceOf(StringIndexOutOfBoundsException.class));
			assertThat(s, startsWith("Could not convert message: 0203666F6F"));
		}

	}
@author Gary Russell
@author Artem Bilan
@since 1.0
spring-xd-messagebus-spi/src/test/java/org/springframework/xd/dirt/integration/bus/MessageConverterTests.java