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