@Test
public void dealsWithInvalidMapTypes() {

    Node object = Node.objectNode().withMember("foo", 10);
    NodeMapper mapper = new NodeMapper();
    NodeDeserializationException e = Assertions.assertThrows(
            NodeDeserializationException.class,
            () -> mapper.deserializeMap(object, Map.class, String.class));
    assertThat(e.getMessage(), equalTo(
            "Deserialization error at (/foo): unable to create java.lang.String from 10"));
}