@Test
public void testUnwantedAdditionalProperty(TestContext context) throws ValidationException {

    try {
        delegateFactory.parseDelegate("someDelegate", Buffer.buffer(UNWANTED_PROPERTY_DELEGATE_RESOURCE));
        context.fail("Should have thrown a ValidationException since additional 'foo' property is not allowed");
    } catch(ValidationException ex){
        context.assertNotNull(ex.getValidationDetails());
        context.assertEquals(1, ex.getValidationDetails().size());
        for(Object obj : ex.getValidationDetails()){
            JsonObject jsonObject = (JsonObject) obj;
            context.assertEquals("additionalProperties", jsonObject.getString("type"));
            context.assertEquals("foo", jsonObject.getJsonArray("arguments").getString(0));
        }
    }
}