@Test
public void deserializedIntoMap() {

    Node heterogeneous = Node.parse("{\"foo\":\"foo\",\"baz\":10}");
    Node homogeneous = Node.parse("{\"foo\":\"foo\",\"baz\":\"baz\"}");
    NodeMapper mapper = new NodeMapper();
    Map<String, Object> heterogeneousMap = mapper.deserializeMap(heterogeneous, Map.class, Object.class);
    Map<String, String> homogeneousMap = mapper.deserializeMap(homogeneous, TreeMap.class, String.class);
    assertThat(heterogeneousMap, instanceOf(HashMap.class));
    assertThat(homogeneousMap, instanceOf(TreeMap.class));
    assertThat(homogeneousMap, hasKey("foo"));
    assertThat(heterogeneousMap, hasKey("foo"));
    assertThat(homogeneousMap, hasKey("baz"));
    assertThat(heterogeneousMap, hasKey("baz"));
    assertThat(homogeneousMap.get("foo"), equalTo("foo"));
    assertThat(heterogeneousMap.get("foo"), equalTo("foo"));
    assertThat(homogeneousMap.get("baz"), equalTo("baz"));
    assertThat(heterogeneousMap.get("baz"), equalTo(10L));
}