@SuppressWarnings("unchecked")
    public static <T> Class<T> loadClass(String className, ClassLoader classLoader) {
        if (isPrimitive(className)) {
            return (Class<T>) primitiveMap.get(className);
        }
        try {
            return (Class<T>) classLoader.loadClass(className);
        } catch (ClassNotFoundException | NullPointerException e) {
            throw new ScenarioException(new StringBuilder().append("Impossible to load class ").append(className).toString(), e);
        }
    }
@Test
    public void loadClassTest() {
        assertThat(loadClass(String.class.getCanonicalName(), classLoader)).isEqualTo(String.class);
        assertThat(loadClass(int.class.getCanonicalName(), classLoader)).isEqualTo(int.class);
        assertThat(loadClass(RuleScenarioRunnerHelperTest.class.getCanonicalName(), classLoader)).isEqualTo(RuleScenarioRunnerHelperTest.class);
        assertThat(loadClass(EnumTest.class.getCanonicalName(), classLoader)).isEqualTo(EnumTest.class);

        assertThatThrownBy(() -> loadClass(null, classLoader))
                .isInstanceOf(ScenarioException.class)
                .hasMessage("Impossible to load class null");

        assertThatThrownBy(() -> loadClass("NotExistingClass", classLoader))
                .isInstanceOf(ScenarioException.class)
                .hasMessage("Impossible to load class NotExistingClass");
    }