@Test
void test_create_invalid_settings() throws ConfigurationException {

    ObjectMapper mapper = new ObjectMapper()
        .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
    AzureProbeMonitorConfiguration azureProbeMonitorConfiguration =
        new AzureProbeMonitorConfiguration(azureConfiguration,
            nvaConfigurations, routeTables, publicIpAddresses,
            null, null, null);
    Map<String, Object> settings = mapper.convertValue(azureProbeMonitorConfiguration,
        new TypeReference<Map<String, Object>>(){});
    settings.remove("azure");
    MonitorConfiguration monitorConfiguration = new MonitorConfiguration(
        "com.company.Monitor", settings);
    Assertions.assertThrows(ConfigurationException.class,
        () -> AzureProbeMonitorConfiguration.create(monitorConfiguration));
}