@Test
    void testMl_serving() throws IOException {
        assumeTrue(OnnxRuntime.isRuntimeAvailable());
        Path appDir = Path.fromString("src/test/cfg/application/ml_serving");
        Path storedAppDir = appDir.append("copy");
        try {
            ImportedModelTester tester = new ImportedModelTester("ml_serving", appDir);
            assertHasMlModels(tester.createVespaModel(), appDir);
            assertEquals(3, tester.calculator.aggregatedModelCostInBytes());

            // At this point the expression is stored - copy application to another location which do not have a models dir
            storedAppDir.toFile().mkdirs();
            IOUtils.copy(appDir.append("services.xml").toString(), storedAppDir.append("services.xml").toString());
            IOUtils.copyDirectory(appDir.append(ApplicationPackage.MODELS_GENERATED_DIR).toFile(),
                    storedAppDir.append(ApplicationPackage.MODELS_GENERATED_DIR).toFile());
            ImportedModelTester storedTester = new ImportedModelTester("ml_serving", storedAppDir);
            assertHasMlModels(storedTester.createVespaModel(), appDir);
        }
        finally {
            IOUtils.recursiveDeleteDir(appDir.append(ApplicationPackage.MODELS_GENERATED_DIR).toFile());
            IOUtils.recursiveDeleteDir(storedAppDir.toFile());
        }
    }
Tests that we do not load models (which would waste memory) when not requested
config-model/src/test/java/com/yahoo/vespa/model/ml/ModelEvaluationTest.java