@Test
    void shouldThrowConfiguratorException() {
        Mapping config = new Mapping();
        config.put("foo", "foo");
        config.put("bar", "abcd");
        config.put("qix", "99");
        ConfiguratorRegistry registry = ConfiguratorRegistry.get();
        ConfiguratorException e = assertThrows(
                ConfiguratorException.class,
                () -> registry.lookupOrFail(Foo.class).configure(config, new ConfigurationContext(registry)),
                "action is excepted to throw ConfiguratorException!");
        assertThat(
                e.getMessage(),
                is(
                        "foo: Failed to construct instance of class io.jenkins.plugins.casc.impl.configurators.DataBoundConfiguratorTest$Foo.\n"
                                + " Constructor: public io.jenkins.plugins.casc.impl.configurators.DataBoundConfiguratorTest$Foo(java.lang.String,boolean,int).\n"
                                + " Arguments: [java.lang.String, java.lang.Boolean, java.lang.Integer].\n"
                                + " Expected Parameters: foo java.lang.String, bar boolean, qix int"));
    }
@author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java