@Test
public void testAnyOf() throws Exception {

    ModelNode schema = json("{\"anyOf\": [{\"type\": \"integer\"}, {\"type\": \"number\"}, {\"type\": \"boolean\"}]}");
    ModelNode json1 = json("1.1");
    ModelNode json2 = json("true");
    ModelNode json3 = json("\"asdf\"");
    PlexusConfiguration c1 = SchemaDrivenJSONToXmlConverter.convert(json1, schema, "ext", null);
    PlexusConfiguration c2 = SchemaDrivenJSONToXmlConverter.convert(json2, schema, "ext", null);
    try {
        SchemaDrivenJSONToXmlConverter.convert(json3, schema, "ext", null);
        fail("Invalid configuration should not have been converted.");
    } catch (IllegalArgumentException __) {
        //good
    }
    assertNotNull(c1);
    assertNotNull(c2);
    assertEquals("ext", c1.getName());
    assertEquals("ext", c2.getName());
    assertEquals(0, c1.getChildCount());
    assertEquals(0, c2.getChildCount());
    assertEquals("1.1", c1.getValue());
    assertEquals("true", c2.getValue());
}