@Test
	public void testJsonStringToPojo() {
		String json = "{\"foo\":\"bar\"}";
		Message<?> msg = MessageBuilder.withPayload(json)
				.build();
		CompositeMessageConverter converter = converterFactory.newInstance(MimeType.valueOf("application/x-java-object"));
		Message<?> result = (Message<?>) converter.fromMessage(msg, Foo.class);
		Foo foo = (Foo) result.getPayload();
		assertEquals("bar", foo.getFoo());
		assertEquals(MimeType.valueOf("application/x-java-object;type=" + foo.getClass().getName()),
				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