@SneakyThrows(ReflectiveOperationException.class)
    public static <T extends YamlConfiguration> T unmarshal(final File yamlFile, final Class<T> classType) throws IOException {
        try (BufferedReader inputStreamReader = Files.newBufferedReader(Paths.get(yamlFile.toURI()))) {
            T result = new Yaml(new ShardingSphereYamlConstructor(classType)).loadAs(inputStreamReader, classType);
            return null == result ? classType.getConstructor().newInstance() : result;
        }
    }
@Test
    void assertUnmarshalInvalidYaml() throws IOException {
        URL url = getClass().getClassLoader().getResource("yaml/accepted-class.yaml");
        assertNotNull(url);
        String yamlContent = readContent(url);
        assertThrows(ComposerException.class, () -> YamlEngine.unmarshal(yamlContent, Object.class));
    }