@Test
public void failOnNonExistingTreeMetadataFolder() {

    URL url = getClass().getClassLoader().getResource(SPARK_MDL_PATH);
    try {
        SparkModelParser.parse(
            url.getPath() + File.separator + "notreesmetadatafolder", SupportedSparkModels.GRADIENT_BOOSTED_TREES
        );
        fail("Expected IllegalArgumentException exception");
    }
    catch (IllegalArgumentException e) {
        assertTrue(e.getMessage().contains("Directory should contain treeMetadata sub-directory"));
    }
}