@Test
public void testArrayConversion_invalid() throws Exception {

    try {
        XmlToJson<Node> converter = converter("list", "{\"type\": \"array\", \"items\": {\"type\": \"integer\"}}");
        Node xml = xml("<config><list>text is invalid</list></config>");
        converter.convert(xml).get(0).get("configuration");
        Assert.fail("Invalid array conversion shouldn't have succeeded.");
    } catch (IllegalArgumentException e) {
        Assert.assertTrue(e.getMessage().contains("<list>"));
    }
}