Class<?> classWithNoAdditionalProperties = resultsClassLoader.loadClass("com.example.NoAdditionalProperties");
mapper.readValue("{\"a\":\"1\", \"b\":2}", classWithNoAdditionalProperties);
}
@Test(expected = UnrecognizedPropertyException.class)
public void additionalPropertiesAreNotDeserializableWhenDisabledGlobally() throws ClassNotFoundException, SecurityException, NoSuchMethodException, IOException {
<BUG>ClassLoader resultsClassLoader = generateAndCompile("/schema/additionalProperties/defaultAdditionalProperties.json", "com.example", config("includeAdditionalProperties", false));
</BUG>
Class<?> classWithNoAdditionalProperties = resultsClassLoader.loadClass("com.example.DefaultAdditionalProperties");
mapper.readValue("{\"a\":\"1\", \"b\":2}", classWithNoAdditionalProperties);
}

Class<?> classWithNoAdditionalProperties = resultsClassLoader.loadClass("com.example.NoAdditionalProperties");
mapper.readValue("{\"a\":\"1\", \"b\":2}", classWithNoAdditionalProperties);
}
@Test(expected = UnrecognizedPropertyException.class)
public void additionalPropertiesAreNotDeserializableWhenDisabledGlobally() throws ClassNotFoundException, SecurityException, NoSuchMethodException, IOException {
ClassLoader resultsClassLoader = schemaRule.generateAndCompile("/schema/additionalProperties/defaultAdditionalProperties.json", "com.example", config("includeAdditionalProperties", false));
Class<?> classWithNoAdditionalProperties = resultsClassLoader.loadClass("com.example.DefaultAdditionalProperties");
mapper.readValue("{\"a\":\"1\", \"b\":2}", classWithNoAdditionalProperties);
}
