@SuppressWarnings("unchecked")
	@Test
	public void testTupleToJson() {
		Tuple t = TupleBuilder.fromString("{\"foo\":\"bar\"}");
		Message<?> msg = MessageBuilder.withPayload(t).build();
		CompositeMessageConverter converter = converterFactory.newInstance(MimeTypeUtils.APPLICATION_JSON);

		Message<String> result = (Message<String>) converter.fromMessage(msg, String.class);
		assertTrue(result.getPayload(), result.getPayload().contains("\"foo\":\"bar\""));
		assertEquals(MimeTypeUtils.APPLICATION_JSON,
				result.getHeaders().get(MessageHeaders.CONTENT_TYPE));
	}
Tests for converting from a Message.

@author David Turanski
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/integration/bus/converter/FromMessageConverterTests.java