@Test
public void testAdditionalMapperPropertiesNotAllowed(TestContext context) {

    try {
        roleMapperFactory.parseRoleMapper(Buffer.buffer(ADDITIONAL_PROP_MAPPER_RESOURCE));
        context.fail("Should have thrown a ValidationException since 'notAllowedProperty' 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;
            if ("additionalProperties".equalsIgnoreCase(jsonObject.getString("keyword"))) {
                context.assertEquals("notAllowedProperty", jsonObject.getJsonArray("unwanted").getString(0));
            }
        }
    }
}