static InjectorSource instantiateUserSpecifiedInjectorSource(Class<?> injectorSourceClass) {
        try {
            return (InjectorSource) injectorSourceClass.getConstructor().newInstance();
        } catch (Exception e) {
            String message = format("Instantiation of '%s' failed. Check the caused by exception and ensure your " +
                    "InjectorSource implementation is accessible and has a public zero args constructor.",
                injectorSourceClass.getName());
            throw new InjectorSourceInstantiationFailed(message, e);
        }
    }
@Test
    void failsToInstantiateClassWithNoDefaultConstructor() {
        Executable testMethod = () -> instantiateUserSpecifiedInjectorSource(NoDefaultConstructor.class);
        InjectorSourceInstantiationFailed actualThrown = assertThrows(InjectorSourceInstantiationFailed.class,
            testMethod);
        assertAll(
            () -> assertThat("Unexpected exception message", actualThrown.getMessage(), is(equalTo(
                "Instantiation of 'io.cucumber.guice.InjectorSourceFactoryTest$NoDefaultConstructor' failed. Check the caused by exception and ensure your InjectorSource implementation is accessible and has a public zero args constructor."))),
            () -> assertThat("Unexpected exception cause class", actualThrown.getCause(),
                isA(NoSuchMethodException.class)));
    }