@Test
    public void testUnmarshall_Simple() throws Exception {
        String json = "{\r\n" +
                "  \"hello\" : \"world\",\r\n" +
                "  \"foo\" : \"bar\"\r\n" +
                "}";

        JsonPayloadIO io = new JsonPayloadIO();
        Map data = io.unmarshall(new ReaderInputStream(new StringReader(json)));
        Assert.assertNotNull(data);
        Assert.assertEquals("world", data.get("hello"));
        Assert.assertEquals("bar", data.get("foo"));
        Assert.assertNull(data.get("other"));

        data = io.unmarshall(json.getBytes("UTF-8"));
        Assert.assertNotNull(data);
        Assert.assertEquals("world", data.get("hello"));
        Assert.assertEquals("bar", data.get("foo"));
        Assert.assertNull(data.get("other"));
    }
Unit Test for {@link JsonPayloadIO}.

@author eric.wittmann@redhat.com
gateway/engine/core/src/test/java/io/apiman/gateway/engine/io/JsonPayloadIOTest.java