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

    try {
        delegateFactory.parseDelegate("someDelegate", Buffer.buffer(TRANSFORM_WITH_METADATA_PROPERTY_NOT_OBJECT_DELEGATE_RESOURCE));
        context.fail("Should have thrown a ValidationException since 'transformWithMetadata' property must be an object");
    } catch(ValidationException ex){
        context.assertNotNull(ex.getValidationDetails());
        context.assertEquals(1, ex.getValidationDetails().size());
        for(Object obj : ex.getValidationDetails()){
            JsonObject jsonObject = (JsonObject) obj;
            context.assertEquals("type", jsonObject.getString("type"));
            context.assertEquals("integer", jsonObject.getJsonArray("arguments").getString(0));
            context.assertEquals("array", jsonObject.getJsonArray("arguments").getString(1));
        }
    }
}