@Test
public void testOneOf() throws Exception {

    ModelNode schema = json("{\"oneOf\": [{\"type\": \"integer\"}, {\"type\": \"number\"}, {\"type\": \"boolean\"}]}");
    ModelNode json1 = json("1");
    ModelNode json2 = json("1.1");
    try {
        SchemaDrivenJSONToXmlConverter.convert(json1, schema, "ext", null);
        fail("Should not have been possible to convert using ambiguous oneOf.");
    } catch (IllegalArgumentException __) {
        //good
    }
    PlexusConfiguration xml = SchemaDrivenJSONToXmlConverter.convert(json2, schema, "ext", null);
    assertNotNull(xml);
    assertEquals("ext", xml.getName());
    assertEquals(0, xml.getChildCount());
    assertEquals("1.1", xml.getValue());
}